Skip to content

Commit 1ca598c

Browse files
avivkellerRafaelGSS
authored andcommitted
cli: allow --test-[name/skip]-pattern in NODE_OPTIONS
PR-URL: #53001 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 824bd58 commit 1ca598c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/api/cli.md

+2
Original file line numberDiff line numberDiff line change
@@ -3021,10 +3021,12 @@ one is included in the list below.
30213021
* `--snapshot-blob`
30223022
* `--test-coverage-exclude`
30233023
* `--test-coverage-include`
3024+
* `--test-name-pattern`
30243025
* `--test-only`
30253026
* `--test-reporter-destination`
30263027
* `--test-reporter`
30273028
* `--test-shard`
3029+
* `--test-skip-pattern`
30283030
* `--throw-deprecation`
30293031
* `--title`
30303032
* `--tls-cipher-list`

src/node_options.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
670670
&EnvironmentOptions::test_runner_snapshots);
671671
AddOption("--test-name-pattern",
672672
"run tests whose name matches this regular expression",
673-
&EnvironmentOptions::test_name_pattern);
673+
&EnvironmentOptions::test_name_pattern,
674+
kAllowedInEnvvar);
674675
AddOption("--test-reporter",
675676
"report test output using the given reporter",
676677
&EnvironmentOptions::test_reporter,
@@ -689,7 +690,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
689690
kAllowedInEnvvar);
690691
AddOption("--test-skip-pattern",
691692
"run tests whose name do not match this regular expression",
692-
&EnvironmentOptions::test_skip_pattern);
693+
&EnvironmentOptions::test_skip_pattern,
694+
kAllowedInEnvvar);
693695
AddOption("--test-coverage-include",
694696
"include files in coverage report that match this glob pattern",
695697
&EnvironmentOptions::coverage_include_pattern,

0 commit comments

Comments
 (0)