Title: node:test watch mode with isolation: 'none' ignores cwd-scoped discovery and reuses parent argv · Issue #63689 · nodejs/node · GitHub
Open Graph Title: node:test watch mode with isolation: 'none' ignores cwd-scoped discovery and reuses parent argv · Issue #63689 · nodejs/node
X Title: node:test watch mode with isolation: 'none' ignores cwd-scoped discovery and reuses parent argv · Issue #63689 · nodejs/node
Description: Version 26.2.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { run } from 'node:test'; import { mkdtemp, writeFile, readFile } from 'node:fs/promises'; import { join } from 'node:path'; import { tmpdir ...
Open Graph Description: Version 26.2.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { run } from 'node:test'; import { mkdtemp, writeFile, readFile } from 'node:fs/promises'; import { j...
X Description: Version 26.2.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { run } from 'node:test'; import { mkdtemp, writeFile, readFile } from 'node:fs/promises&...
Opengraph URL: https://github.com/nodejs/node/issues/63689
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"node:test watch mode with isolation: 'none' ignores cwd-scoped discovery and reuses parent argv","articleBody":"### Version\n\n26.2.0\n\n### Platform\n\n```text\nmacOS 26.5.0\n```\n\n### Subsystem\n\nstream\n\n### What steps will reproduce the bug?\n\n```js\nimport { run } from 'node:test';\nimport { mkdtemp, writeFile, readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { tmpdir } from 'node:os';\n\nconst cwd = await mkdtemp(join(tmpdir(), 'node-test-'));\nconst marker = join(cwd, 'ran');\n\nawait writeFile(join(cwd, 'test.js'), `\n const test = require('node:test');\n const { writeFileSync } = require('node:fs');\n test('from cwd', () =\u003e writeFileSync(${JSON.stringify(marker)}, 'yes'));\n`);\n\nconst ac = new AbortController();\nconst stream = run({\n cwd,\n watch: true,\n isolation: 'none',\n signal: ac.signal,\n});\n\nstream.on('data', ({ type }) =\u003e {\n if (type === 'test:watch:drained') ac.abort();\n});\n\nfor await (const _ of stream);\n\nconst ran = await readFile(marker, 'utf8').catch(() =\u003e 'no');\nconsole.log({ ran });\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\n```console\n{ ran: 'yes' }\n```\n\n`run({ cwd, watch: true, isolation: 'none' })` should discover and execute tests from the supplied `cwd`, then report the result of those tests. In the repro, the cwd fixture should run and write the marker file.\n\n### What do you see instead?\n\n```console\n{ ran: 'no' }\n```\n\nThe isolation-none watch child is spawned using the parent process argv while its working directory is changed to the supplied `cwd`. This can run the wrong entry point, recurse into the driver, or execute no intended cwd test, so the marker is not written.\n\n### Additional information\n\nThis is likely the same failure mode behind `test-runner/test-run-watch-cwd-isolation-none`: that test expects one pass from the fixture copied into `tmpdir.path`, but the implementation can spawn a watch child using the outer test’s argv instead of the cwd-scoped fixture. Depending on invocation and tmpdir state, it may report zero passes, fail recursively, or exit with code 1, making the CI failure flaky.","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-06-01T06:36:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/63689/node/issues/63689"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9a8ba957-2be8-6e83-82e6-d9b6e0cd09ac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D134:24C6EB:B88881:100A3BA:6A4CA3CC |
| html-safe-nonce | 9153109f5fe0477ff663feed29062ae95a3694e819e2120bd785ee81c1257c1a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTM0OjI0QzZFQjpCODg4ODE6MTAwQTNCQTo2QTRDQTNDQyIsInZpc2l0b3JfaWQiOiI3NTg5MDExMjczMTEyMzk2NzQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b044ec531497d6e1376f81755c4cf8170377cd8fdb4ee1fc58e814423220315e |
| hovercard-subject-tag | issue:4560893119 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/63689/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d0e2cf61b70e34916c669f392e9490fa1a1dda43758cbcd4e79255210d865ffd/nodejs/node/issues/63689 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d0e2cf61b70e34916c669f392e9490fa1a1dda43758cbcd4e79255210d865ffd/nodejs/node/issues/63689 |
| og:image:alt | Version 26.2.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { run } from 'node:test'; import { mkdtemp, writeFile, readFile } from 'node:fs/promises'; import { j... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ae90d426644ca15e89bacceb72e51f4e9dbf85f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width