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 committed Aug 16, 2024
1 parent 8d37584 commit 59da1df
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 @@ -2999,10 +2999,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 @@ -658,7 +658,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 @@ -677,7 +678,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 59da1df

Please sign in to comment.