Title: Test runner with isolation=none does not work with coverage · Issue #60023 · nodejs/node · GitHub
Open Graph Title: Test runner with isolation=none does not work with coverage · Issue #60023 · nodejs/node
X Title: Test runner with isolation=none does not work with coverage · Issue #60023 · nodejs/node
Description: Version v24.9.0 Platform Linux home 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Subsystem No response What steps will reproduce the bug? runner.js import { run } from "node:test"; import ...
Open Graph Description: Version v24.9.0 Platform Linux home 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Subsystem No response What steps will reproduce the bug? runner.js ...
X Description: Version v24.9.0 Platform Linux home 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Subsystem No response What steps will reproduce the bug? runner.js ...
Opengraph URL: https://github.com/nodejs/node/issues/60023
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test runner with isolation=none does not work with coverage","articleBody":"### Version\n\nv24.9.0\n\n### Platform\n\n```text\nLinux home 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux\n```\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\nrunner.js\n\n```js\nimport { run } from \"node:test\";\nimport { spec } from \"node:test/reporters\";\n\nconst stream = run({\n isolation: \"none\",\n coverage: true,\n});\n\nstream.compose(spec).pipe(process.stdout);\n```\n\ndummy.test.js\n\n```js\nimport { describe, it } from \"node:test\";\nimport * as assert from \"node:assert\";\n\ndescribe(\"suite\", () =\u003e {\n it(\"works\", () =\u003e {\n assert.ok(true);\n });\n});\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways. No.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nWith `isolation: \"process\"` (the default), here's the output:\n\n```\n▶ suite\n ✔ works (0.789789ms)\n✔ suite (2.636181ms)\nℹ tests 1\nℹ suites 1\nℹ pass 1\nℹ fail 0\nℹ cancelled 0\nℹ skipped 0\nℹ todo 0\nℹ duration_ms 77.285385\nℹ start of coverage report\nℹ -----------------------------------------------------------------\nℹ file | line % | branch % | funcs % | uncovered lines\nℹ -----------------------------------------------------------------\nℹ test | | | | \nℹ dummy.test.js | 100.00 | 100.00 | 100.00 | \nℹ -----------------------------------------------------------------\nℹ all files | 100.00 | 100.00 | 100.00 | \nℹ -----------------------------------------------------------------\nℹ end of coverage report\n```\n\n### What do you see instead?\n\nWith `isolation: \"none\"`, here's the output:\n\n```\n▶ suite\n ✔ works (0.979666ms)\n✔ suite (2.172736ms)\nℹ tests 1\nℹ suites 1\nℹ pass 1\nℹ fail 0\nℹ cancelled 0\nℹ skipped 0\nℹ todo 0\nℹ duration_ms 28.684242\nℹ start of coverage report\nℹ ----------------------------------------------------------\nℹ file | line % | branch % | funcs % | uncovered lines\nℹ ----------------------------------------------------------\nℹ ----------------------------------------------------------\nℹ all files | 100.00 | 100.00 | 100.00 | \nℹ ----------------------------------------------------------\nℹ end of coverage report\n```\n\n(empty coverage)\n\nThe test stream emits a \"test:coverage\" event, but it is empty:\n\n```js\n[Object: null prototype] {\n nesting: 0,\n summary: [Object: null prototype] {\n workingDirectory: '/home/damien/git/socket.io/tmp',\n files: [],\n totals: [Object: null prototype] {\n totalLineCount: 0,\n totalBranchCount: 0,\n totalFunctionCount: 0,\n coveredLineCount: 0,\n coveredBranchCount: 0,\n coveredFunctionCount: 0,\n coveredLinePercent: 100,\n coveredBranchPercent: 100,\n coveredFunctionPercent: 100\n },\n thresholds: [Object: null prototype] { line: 0, branch: 0, function: 0 }\n }\n}\n```\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/darrachequesne","@type":"Person","name":"darrachequesne"},"datePublished":"2025-09-26T08:56:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/60023/node/issues/60023"}
| 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:59c4d381-0e21-5ed9-dd3d-ac56cf799c7a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9230:223EF0:1A4082:24B6D8:6A4C9A0A |
| html-safe-nonce | a60b8d6f50d18a528ca78a7e26461ab421579471240737e4c89250f47cc74d03 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjMwOjIyM0VGMDoxQTQwODI6MjRCNkQ4OjZBNEM5QTBBIiwidmlzaXRvcl9pZCI6IjU0MzI2NTM5NTYzOTA4ODU4OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ffc96c496bdefae085a616708b9a3e50c32e3ace0c4a4389ba2b91fc257e90ff |
| hovercard-subject-tag | issue:3456459749 |
| 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/60023/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e9e178eb588996c94380a436b54eb5caac2bddb900f51fbf7a91a09b8762e5e2/nodejs/node/issues/60023 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e9e178eb588996c94380a436b54eb5caac2bddb900f51fbf7a91a09b8762e5e2/nodejs/node/issues/60023 |
| og:image:alt | Version v24.9.0 Platform Linux home 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Subsystem No response What steps will reproduce the bug? runner.js ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | darrachequesne |
| 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 | 7a2dede45637df6b92ddcfe2a557e67d4b5854ae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width