Skip to content

Commit e2cc122

Browse files
committed
feat(scripts/feature-coverage): add --list option
1 parent 15b4c3c commit e2cc122

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/feature-coverage.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ const main = (bcd: CompatData, tests: Tests) => {
269269
type: "string",
270270
default: "collector-from-bcd",
271271
})
272+
.option("list", {
273+
alias: "l",
274+
describe: "List all features supported by the collector",
275+
type: "boolean",
276+
default: false,
277+
})
272278
.option("path", {
273279
alias: "p",
274280
describe: "The path(s) to filter for",
@@ -285,6 +291,13 @@ const main = (bcd: CompatData, tests: Tests) => {
285291
},
286292
);
287293

294+
if (argv.list) {
295+
Object.keys(tests)
296+
.filter((p) => !p.startsWith("__"))
297+
.forEach((key) => console.log(key));
298+
return;
299+
}
300+
288301
const direction = argv.direction.split("-from-");
289302

290303
if (!argv.countOnly) {

0 commit comments

Comments
 (0)