Skip to content

doc: note that watch mode reruns all files with isolation none - #65038

Open
ethanresnick wants to merge 1 commit into
nodejs:mainfrom
ethanresnick:doc-watch-isolation-none
Open

doc: note that watch mode reruns all files with isolation none#65038
ethanresnick wants to merge 1 commit into
nodejs:mainfrom
ethanresnick:doc-watch-isolation-none

Conversation

@ethanresnick

Copy link
Copy Markdown

The Watch mode section promises that a change "will rerun the tests affected by
the change", with no isolation caveat, and the isolation option is documented
purely as where tests run. But the two interact: watchFiles' 'changed'
handler restarts only the files owning the change under isolation: 'process',
and a single child running the whole file list under isolation: 'none'
(runner.js#L659-L672).

Verified on v26.5.0 with two test files, editing only the first:

node --test --watch a.test.js b.test.js
  ✔ A-ran        ℹ tests 1

node --test --test-isolation=none --watch a.test.js b.test.js
  ✔ A-ran  ✔ B-ran        ℹ tests 2

Docs-only; this describes current behavior rather than changing it. Whether the
behavior itself should change is #65037 — if it does, this paragraph goes away
with it.

Copilot AI lite review requested due to automatic review settings August 5, 2026 06:36
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem. labels Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the node:test documentation to clarify how watch mode interacts with the --test-isolation setting, aligning the docs with the current behavior when running tests in a shared process.

Changes:

  • Add a note to the Watch mode section explaining that rerun scope differs between --test-isolation=process (affected files) and --test-isolation=none (all files).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread doc/api/test.md
Comment on lines +616 to +619
This is subject to the isolation mode. With `--test-isolation=process` (the
default), only the test files affected by the change are rerun. With
`--test-isolation=none`, every test file in the run is rerun, because those
files share a single process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants