summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve Herzog <srherzog@gmail.com>2023-03-14 11:59:35 -0500
committerGitHub <noreply@github.com>2023-03-14 16:59:35 +0000
commit334bb179dfef5ad51e3dc1a7925a00b07bedada6 (patch)
tree8767fb721d3ae39d0ded3c477440db30f813202c /src
parentb80ab31124a170369eeb15c88d9bac54d65fb91b (diff)
downloadnode-new-334bb179dfef5ad51e3dc1a7925a00b07bedada6.tar.gz
test_runner: support defining test reporter in NODE_OPTIONS
Adds --test-reporter and --test-reporter-destination as allowable options in NODE_OPTIONS. Also adds the CLI flag --test-child-process to allow forcing the default test-reporter for inter-process communication. Fixes: https://github.com/nodejs/node/issues/46484 PR-URL: https://github.com/nodejs/node/pull/46688 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_options.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/node_options.cc b/src/node_options.cc
index 3551b38fca..648488f5b3 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -590,10 +590,12 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
&EnvironmentOptions::test_name_pattern);
AddOption("--test-reporter",
"report test output using the given reporter",
- &EnvironmentOptions::test_reporter);
+ &EnvironmentOptions::test_reporter,
+ kAllowedInEnvvar);
AddOption("--test-reporter-destination",
"report given reporter to the given destination",
- &EnvironmentOptions::test_reporter_destination);
+ &EnvironmentOptions::test_reporter_destination,
+ kAllowedInEnvvar);
AddOption("--test-only",
"run tests with 'only' option set",
&EnvironmentOptions::test_only,