Skip to content

node:test: run(), expectFailure, and Node v26.3.0 skip/todo semantics - #34444

Merged
dylan-conway merged 44 commits into
mainfrom
claude/node-test-run-api
Jul 24, 2026
Merged

node:test: run(), expectFailure, and Node v26.3.0 skip/todo semantics#34444
dylan-conway merged 44 commits into
mainfrom
claude/node-test-run-api

node:test run(): report remaining files as cancelledByParent on abort…

9ab4918
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 24, 2026 in 36m 46s

Code review found 2 potential issues

Found 2 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/js/node/test.ts:547-571 Mid-file abort reports testCodeFailure instead of cancelledByParent (residual of 9ab4918)

Annotations

Check warning on line 571 in src/js/node/test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Mid-file abort reports testCodeFailure instead of cancelledByParent (residual of 9ab4918b)

When `opts.signal` aborts *while a file is running*, `runOneFile` reports it as `failureType: 'testCodeFailure'` (with the raw stderr banner as the message) and `fileCounts.failed++`, whereas Node's `FileTest.cancel()` reports `'cancelledByParent'` with the fixed *'test did not finish before its parent and was cancelled'* message and counts it in `cancelled`. After `const exitCode = await proc.exited`, branch on `opts.signal?.aborted && exitCode !== 0` and mirror `reportCancelledFile`'s error/co