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

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 Node.js documentation. 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 Resolved
@MikeMcC399

This comment was marked as resolved.

@MikeMcC399

This comment was marked as resolved.

@ethanresnick
ethanresnick force-pushed the doc-watch-isolation-none branch from e25f832 to df85904 Compare December 4, 2026 12:03
@MikeMcC399

This comment was marked as resolved.

@ethanresnick
ethanresnick force-pushed the doc-watch-isolation-none branch 2 times, most recently from 3ca2edd to 7ac5a3b Compare December 4, 2026 18:56
The watch mode docs say only the tests affected by a change are rerun,
but with `--test-isolation=none` the test runner reruns every test file
in the run. Document how watch mode depends on the isolation mode.

Signed-off-by: Ethan Resnick <ethan.resnick@gmail.com>
@ethanresnick
ethanresnick force-pushed the doc-watch-isolation-none branch from 7ac5a3b to 3040c08 Compare December 4, 2026 18:57
@ethanresnick

Copy link
Copy Markdown
Author

@MikeMcC399 fixed!

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 Node.js documentation. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants