From 1fa0c6993d70c746e0c863e015189392acf6b8fa Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Sat, 27 Jan 2024 21:50:29 +0200 Subject: [PATCH] test_runner: allow running test files in single process --- doc/api/cli.md | 13 +++++ doc/api/test.md | 3 ++ lib/internal/main/test_runner.js | 5 +- lib/internal/test_runner/harness.js | 2 +- lib/internal/test_runner/runner.js | 54 ++++++++++++++++--- lib/internal/test_runner/test.js | 9 ++-- lib/internal/test_runner/utils.js | 12 +---- src/env-inl.h | 3 +- src/node_options.cc | 11 ++-- src/node_options.h | 1 + test/parallel/test-runner-v8-deserializer.mjs | 2 +- 11 files changed, 88 insertions(+), 27 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 840585765e7fa6..46ed33a79573ad 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -894,6 +894,18 @@ 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` + + + +When running tests with the `node:test` module, +each test file is run in its own process. +running `--experimental-test-isolation=none` will run all +files in the same process. + ### `--experimental-vm-modules`