Skip to content

Commit bcccf92

Browse files
committed
Document the node --test IPC flake and add a workaround script
npm test intermittently fails on Node 22.x with ERR_TEST_FAILURE / "Unable to deserialize cloned data" — an upstream Node.js test-runner bug (nodejs/node#64061, fixed on main/v24.x/v26.x, backport to v22.x still open as nodejs/node#65934). A non-ASCII byte in a test file's stdout (this repo logs with unicode symbols throughout lib/*.js) desyncs the per-file worker IPC framing. Confirmed reproducible with only the pre-existing test files, unrelated to any application logic. Add npm run test:stable (--experimental-test-isolation=none, single process, no IPC) as an opt-in workaround, and document the root cause in docs/ARCHITECTURE.md so it isn't mistaken for a real test failure.
1 parent 7daa2dd commit bcccf92

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎docs/ARCHITECTURE.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,19 @@ token expiry/renewal/throttling, manifest status semantics, the resume cache,
223223
CSV round-tripping of multi-line/quoted fields, the MSAL encrypted cache
224224
plugin, and the `compare.js` run-diffing logic.
225225

226+
> On Node 22.x, `npm test` can intermittently fail with `ERR_TEST_FAILURE` /
227+
> `Unable to deserialize cloned data due to invalid or unsupported version`.
228+
> That's an upstream Node.js test-runner bug
229+
> ([nodejs/node#64061](https://github.com/nodejs/node/issues/64061)): a
230+
> non-ASCII byte in a test file's stdout (this codebase logs with ✓/⚠/🔒/↻
231+
> throughout `lib/*.js`) can desync the IPC framing between the runner and
232+
> its per-file worker process. Fixed on `main`/v24.x/v26.x; the v22.x
233+
> backport is still open ([nodejs/node#65934](https://github.com/nodejs/node/issues/65934)).
234+
> Not a bug in this repo's tests or application code — a failing assertion
235+
> would never look like this. `npm run test:stable` works around it
236+
> (`--experimental-test-isolation=none`, single-process, no IPC) until the
237+
> backport lands or the project moves to Node 24+.
238+
226239
`npm run test:render -- <output_dir> [--strict-a11y]` loads `00_REPORT.html`
227240
in a real browser, then clicks through **every tab** and asserts each one
228241
rendered (no new JS errors, non-trivial content) — not just the dashboard.

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"check-permissions": "node collect.js --check-permissions",
5252
"setup:browser": "playwright install chromium",
5353
"test": "node --test \"test/*.test.js\"",
54+
"test:stable": "node --experimental-test-isolation=none --test \"test/*.test.js\"",
5455
"test:render": "node test/render-check.js"
5556
},
5657
"engines": {

0 commit comments

Comments
 (0)