test_runner: fix watch cwd with isolation none#63690
Open
trivikr wants to merge 1 commit into
Open
Conversation
Collaborator
|
Review requested:
|
When watch mode runs with isolation disabled, spawn the child test runner with the files or glob patterns from the current run instead of reusing the parent process argv. This keeps discovery scoped to the configured cwd and avoids rerunning the driver test when the parent argv points outside that cwd. Fixes: nodejs#63689 Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5
7e54c89 to
423a1e2
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #63690 +/- ##
==========================================
- Coverage 90.35% 90.35% -0.01%
==========================================
Files 732 732
Lines 236527 236531 +4
Branches 44535 44536 +1
==========================================
- Hits 213717 213716 -1
+ Misses 14533 14531 -2
- Partials 8277 8284 +7
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
run({ watch: true, cwd, isolation: 'none' })spawned the watch child,it reused the parent process argv while changing the child process cwd. That
could make the child run the outer test file, recurse, or miss the test file
that was discovered under the configured cwd.
This updates the isolation-none watch path to spawn the child test runner with
the current run's explicit files or glob patterns instead of
process.argv.A regression test verifies that the cwd-scoped test file actually runs.
Fixes: #63689
Fixes a flaky failure in
test-runner/test-run-watch-cwd-isolation-none.Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-06-01.md#jstest-failure
Example error log
Assisted-by: openai:gpt-5.5