From 102f68a3a5f5acc3489df5763789a0d2a0850d13 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 17 Dec 2024 17:57:21 -0500 Subject: [PATCH] test_runner,cli: mark test isolation as stable This commit stabilizes test isolation configuration in the test runner. --- doc/api/cli.md | 36 ++++++++++--------- doc/node.1 | 6 ++-- lib/internal/test_runner/utils.js | 2 +- src/node_options.cc | 9 ++--- test/parallel/test-runner-cli-concurrency.js | 4 +-- test/parallel/test-runner-cli-timeout.js | 2 +- test/parallel/test-runner-cli.js | 18 +++++----- test/parallel/test-runner-coverage.js | 2 +- .../test-runner-extraneous-async-activity.js | 2 +- .../test-runner-force-exit-failure.js | 2 +- .../test-runner-no-isolation-filtering.js | 8 ++--- .../test-runner-no-isolation-hooks.mjs | 2 +- test/parallel/test-runner-snapshot-tests.js | 6 ++-- test/parallel/test-runner-watch-mode.mjs | 2 +- 14 files changed, 53 insertions(+), 48 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 0e21fed5eba930..37d59163b193a3 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1025,20 +1025,6 @@ generated as part of the test runner output. If no tests are run, a coverage report is not generated. See the documentation on [collecting code coverage from tests][] for more details. -### `--experimental-test-isolation=mode` - - - -> Stability: 1.0 - Early development - -Configures the type of test isolation used in the test runner. When `mode` is -`'process'`, each test file is run in a separate child process. When `mode` is -`'none'`, all test files run in the same process as the test runner. The default -isolation mode is `'process'`. This flag is ignored if the `--test` flag is not -present. See the [test runner execution model][] section for more information. - ### `--experimental-test-module-mocks` The maximum number of test files that the test runner CLI will execute -concurrently. If `--experimental-test-isolation` is set to `'none'`, this flag -is ignored and concurrency is one. Otherwise, concurrency defaults to +concurrently. If `--test-isolation` is set to `'none'`, this flag is ignored and +concurrency is one. Otherwise, concurrency defaults to `os.availableParallelism() - 1`. ### `--test-coverage-branches=threshold` @@ -2323,6 +2309,22 @@ added: Configures the test runner to exit the process once all known tests have finished executing even if the event loop would otherwise remain active. +### `--test-isolation=mode` + + + +Configures the type of test isolation used in the test runner. When `mode` is +`'process'`, each test file is run in a separate child process. When `mode` is +`'none'`, all test files run in the same process as the test runner. The default +isolation mode is `'process'`. This flag is ignored if the `--test` flag is not +present. See the [test runner execution model][] section for more information. + ### `--test-name-pattern`