Title: test_runner: with --test-isolation=none, a file that throws after registering a test passes (exit 0, error not shown) · Issue #66549 · nodejs/node · GitHub
Open Graph Title: test_runner: with --test-isolation=none, a file that throws after registering a test passes (exit 0, error not shown) · Issue #66549 · nodejs/node
X Title: test_runner: with --test-isolation=none, a file that throws after registering a test passes (exit 0, error not shown) · Issue #66549 · nodejs/node
Description: Version v26.10.0 Platform Darwin 27.0.0 arm64 Subsystem test_runner What steps will reproduce the bug? repro.test.mjs: import { test } from 'node:test'; test('registered first', () => {}); null.x; // throws while the file loads test('nev...
Open Graph Description: Version v26.10.0 Platform Darwin 27.0.0 arm64 Subsystem test_runner What steps will reproduce the bug? repro.test.mjs: import { test } from 'node:test'; test('registered first', () => {}); null.x; ...
X Description: Version v26.10.0 Platform Darwin 27.0.0 arm64 Subsystem test_runner What steps will reproduce the bug? repro.test.mjs: import { test } from 'node:test'; test('registered first', () ...
Opengraph URL: https://github.com/nodejs/node/issues/66549
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_runner: with --test-isolation=none, a file that throws after registering a test passes (exit 0, error not shown)","articleBody":"### Version\n\nv26.10.0\n\n### Platform\n\n```text\nDarwin 27.0.0 arm64\n```\n\n### Subsystem\n\ntest_runner\n\n### What steps will reproduce the bug?\n\n`repro.test.mjs`:\n\n```js\nimport { test } from 'node:test';\n\ntest('registered first', () => {});\nnull.x; // throws while the file loads\ntest('never registered', () => {});\n```\n\n```sh\nnode --test --test-isolation=none repro.test.mjs; echo \"exit $?\"\n```\n\n### How often does it reproduce? Is there a required condition?\n\nEvery time. The file must register at least one test before it throws. If the throw comes before any `test()` call, the run fails as expected.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nThe file fails to load, so the run should fail, as it does with the default process isolation:\n\n```text\n$ node --test repro.test.mjs\nTypeError: Cannot read properties of null (reading 'x')\nℹ tests 1\nℹ pass 0\nℹ fail 1\n```\n\n### What do you see instead?\n\nThe error is never printed, the rest of the file is silently skipped, and the run passes:\n\n```text\n$ node --test --test-isolation=none repro.test.mjs; echo \"exit $?\"\n✔ registered first (0.212625ms)\nℹ tests 1\nℹ suites 0\nℹ pass 1\nℹ fail 0\nℹ cancelled 0\nℹ skipped 0\nℹ todo 0\nℹ duration_ms 4.442542\nexit 0\n```\n\n### Additional information\n\nFound while running a mutation tester (Stryker) with `--test-isolation=none` to speed it up: a mutant that made a rule throw on one input survived, because the table-driven test file that computes its cases at load time stopped partway through and the run still exited 0. With several files, the other files' tests run and the broken file's later tests just disappear from the count (129 of 198 in that case), so nothing looks wrong unless you compare totals.\n\nPossibly related: #64833 (`--test-force-exit` with concurrency loses verdicts and exits 0).\n","author":{"url":"https://github.com/ken-talltree-io","@type":"Person","name":"ken-talltree-io"},"datePublished":"2026-10-06T02:38:15Z","url":"https://github.com/nodejs/node/issues/66549"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:2362eea8-9fb6-9df1-c2b1-fa8d0a8454e7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B9AA:195268:4150A2:54836A:6AED21CE |
| html-safe-nonce | 4da2caa0387336382d9d3be292d1a1cbb6548d8d4a3ab6638fd605768fef0d06 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUFBOjE5NTI2ODo0MTUwQTI6NTQ4MzZBOjZBRUQyMUNFIiwidmlzaXRvcl9pZCI6IjExMDUwODEwNzY4NzE0MDYwMzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c5f78f2c4152f6ed61329eac3648e85811557d0e6ea2f7425137c2f02856ebba |
| hovercard-subject-tag | issue:5722029177 |
| 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/66549/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8c9bd08bbce3925770bde339e2b19183f8ec8852b3a57f233b7ae053981e8ac1/nodejs/node/issues/66549 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8c9bd08bbce3925770bde339e2b19183f8ec8852b3a57f233b7ae053981e8ac1/nodejs/node/issues/66549 |
| og:image:alt | Version v26.10.0 Platform Darwin 27.0.0 arm64 Subsystem test_runner What steps will reproduce the bug? repro.test.mjs: import { test } from 'node:test'; test('registered first', () => {}); null.x; ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ken-talltree-io |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| 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 | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width