Skip to content

Commit

Permalink
cli: allow --test-[name/skip]-pattern in NODE_OPTIONS
Browse files Browse the repository at this point in the history
PR-URL: #53001
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
  • Loading branch information
RedYetiDev authored and RafaelGSS committed Aug 21, 2024
1 parent 824bd58 commit 1ca598c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3021,10 +3021,12 @@ one is included in the list below.
* `--snapshot-blob`
* `--test-coverage-exclude`
* `--test-coverage-include`
* `--test-name-pattern`
* `--test-only`
* `--test-reporter-destination`
* `--test-reporter`
* `--test-shard`
* `--test-skip-pattern`
* `--throw-deprecation`
* `--title`
* `--tls-cipher-list`
Expand Down
6 changes: 4 additions & 2 deletions src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
&EnvironmentOptions::test_runner_snapshots);
AddOption("--test-name-pattern",
"run tests whose name matches this regular expression",
&EnvironmentOptions::test_name_pattern);
&EnvironmentOptions::test_name_pattern,
kAllowedInEnvvar);
AddOption("--test-reporter",
"report test output using the given reporter",
&EnvironmentOptions::test_reporter,
Expand All @@ -689,7 +690,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
kAllowedInEnvvar);
AddOption("--test-skip-pattern",
"run tests whose name do not match this regular expression",
&EnvironmentOptions::test_skip_pattern);
&EnvironmentOptions::test_skip_pattern,
kAllowedInEnvvar);
AddOption("--test-coverage-include",
"include files in coverage report that match this glob pattern",
&EnvironmentOptions::coverage_include_pattern,
Expand Down

0 comments on commit 1ca598c

Please sign in to comment.