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
  • Loading branch information
RedYetiDev committed Aug 13, 2024
1 parent 123693c commit b73c9f6
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 @@ -2993,10 +2993,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 b73c9f6

Please sign in to comment.