mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test_runner: add tags option and tag-name filter
Adds a `tags` option to test(), it(), suite(), and describe() that accepts an array of string labels. Tags are canonicalized to lowercase and inherited from suites to nested tests by union. Reporter events expose the tag set on every test, and TestContext exposes the test's tags via `context.tags`. Filtering is done by literal tag name through the new `--experimental-test-tag-filter=<tag>` flag (or `testTagFilters` on run()). The flag may be specified more than once; tests must contain every filter to run. Untagged tests are excluded under any positive filter. The tagging mechanism is gated behind a one-shot ExperimentalWarning. Signed-off-by: atlowChemi <chemi@atlow.co.il> PR-URL: https://github.com/nodejs/node/pull/63221 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh>
This commit is contained in:
1 parent
e8c3db1364
commit
d03d96889b
17 files changed
+981
-16
No files matched your search
@@ -222,6 +222,10 @@ Disable support for loading ECMAScript modules with require().
|
||||
.It Fl -no-strip-types
|
||||
Disable type-stripping for TypeScript files.
|
||||
.
|
||||
.It Fl -experimental-test-tag-filter Ar tag
|
||||
Run only tests whose tag set contains \fItag\fR. May be specified multiple
|
||||
times; tests must contain every filter to run.
|
||||
.
|
||||
.It Fl -experimental-vm-modules
|
||||
Enable experimental ES module support in VM module.
|
||||
.
|
||||
|
||||
Reference in new issue
Block a user