Skip to content

Commit 59da1df

Browse files
authored
cli: allow --test-[name/skip]-pattern in NODE_OPTIONS
PR-URL: #53001 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
1 parent 8d37584 commit 59da1df

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/api/cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2999,10 +2999,12 @@ one is included in the list below.
29992999
* `--snapshot-blob`
30003000
* `--test-coverage-exclude`
30013001
* `--test-coverage-include`
3002+
* `--test-name-pattern`
30023003
* `--test-only`
30033004
* `--test-reporter-destination`
30043005
* `--test-reporter`
30053006
* `--test-shard`
3007+
* `--test-skip-pattern`
30063008
* `--throw-deprecation`
30073009
* `--title`
30083010
* `--tls-cipher-list`

src/node_options.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
658658
&EnvironmentOptions::test_runner_snapshots);
659659
AddOption("--test-name-pattern",
660660
"run tests whose name matches this regular expression",
661-
&EnvironmentOptions::test_name_pattern);
661+
&EnvironmentOptions::test_name_pattern,
662+
kAllowedInEnvvar);
662663
AddOption("--test-reporter",
663664
"report test output using the given reporter",
664665
&EnvironmentOptions::test_reporter,
@@ -677,7 +678,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
677678
kAllowedInEnvvar);
678679
AddOption("--test-skip-pattern",
679680
"run tests whose name do not match this regular expression",
680-
&EnvironmentOptions::test_skip_pattern);
681+
&EnvironmentOptions::test_skip_pattern,
682+
kAllowedInEnvvar);
681683
AddOption("--test-coverage-include",
682684
"include files in coverage report that match this glob pattern",
683685
&EnvironmentOptions::coverage_include_pattern,

0 commit comments

Comments
 (0)