Version
v24.19.0
Platform
windows-2025-vs2026 (GitHub-hosted windows-latest runner), x64
Subsystem
test_runner
What steps will reproduce the bug?
Run a multi-file suite under node --test on Windows:
node --test --test-concurrency=1 \
--test-reporter=spec --test-reporter-destination=stdout \
--test-reporter=junit --test-reporter-destination=test-results/junit.xml \
"dist/test/*.test.js"
Intermittently one test file is reported as failed even though every test in it
passed. I have not found a minimal reproducer — it is timing-dependent and does
not reproduce on demand.
How often does it reproduce? Is there a required condition?
Intermittent, perhaps 1 run in 8 across a ~1330-test suite. Only on the Windows
leg; the same commit passes on Linux, arm64 (QEMU) and macOS in the same
matrix, and passes on Windows when the job is re-run with no change.
--test-concurrency=1 does not prevent it.
What is the expected behavior? Why is that the expected behavior?
A test file whose tests all pass should be reported as passing. The process
exit status should reflect the test results.
What do you see instead?
The file is reported failed at :1:1 — the whole-file marker rather than any
assertion — while its own tests all show ✔:
✔ resolveSignalkNetworks (7.2616ms)
✖ dist\test\resolveSignalkNetworks.test.js (249.1325ms)
...
ℹ tests 1327
ℹ pass 1323
ℹ fail 1
'test failed'
The JUnit reporter contradicts this in the same run — zero failures overall:
tests=1340 failures=0 errors=0
and the suite for that file reports every test passing:
<testsuite name="resolveSignalkNetworks" tests="5" failures="0" errors="0">
while the file-level testcase in the same document carries:
<testcase name="dist\test\resolveSignalkNetworks.test.js" time="0.249133">
<failure type="testCodeFailure" message="test failed">
[Error: test failed] {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: 'test failed',
exitCode: 3221225477,
signal: null
}
</failure>
</testcase>
3221225477 is 0xC0000005 — STATUS_ACCESS_VIOLATION. The test file's child
process appears to crash after completing its tests, rather than exiting
non-zero from user code.
Additional information
- The affected file differs between occurrences and has been unrelated to the
change under test each time. The run above was on a PR touching a different
file entirely.
- The console and JUnit totals disagree in an affected run (1327 vs 1340),
which suggests the crash also truncates reporter accounting.
- I have the
exitCode value from one retained CI artifact (7-day retention
expired the earlier ones). The behavioural pattern — all tests pass, file
reported failed, clean re-run — is from several occurrences.
I am happy to gather more if it would help narrow this: a specific reporter
combination, --test-concurrency setting, or an approach to collecting a crash
dump on a GitHub-hosted Windows runner.
Version
v24.19.0
Platform
windows-2025-vs2026(GitHub-hostedwindows-latestrunner), x64Subsystem
test_runner
What steps will reproduce the bug?
Run a multi-file suite under
node --teston Windows:Intermittently one test file is reported as failed even though every test in it
passed. I have not found a minimal reproducer — it is timing-dependent and does
not reproduce on demand.
How often does it reproduce? Is there a required condition?
Intermittent, perhaps 1 run in 8 across a ~1330-test suite. Only on the Windows
leg; the same commit passes on Linux, arm64 (QEMU) and macOS in the same
matrix, and passes on Windows when the job is re-run with no change.
--test-concurrency=1does not prevent it.What is the expected behavior? Why is that the expected behavior?
A test file whose tests all pass should be reported as passing. The process
exit status should reflect the test results.
What do you see instead?
The file is reported failed at
:1:1— the whole-file marker rather than anyassertion — while its own tests all show
✔:The JUnit reporter contradicts this in the same run — zero failures overall:
and the suite for that file reports every test passing:
while the file-level testcase in the same document carries:
3221225477is0xC0000005—STATUS_ACCESS_VIOLATION. The test file's childprocess appears to crash after completing its tests, rather than exiting
non-zero from user code.
Additional information
change under test each time. The run above was on a PR touching a different
file entirely.
which suggests the crash also truncates reporter accounting.
exitCodevalue from one retained CI artifact (7-day retentionexpired the earlier ones). The behavioural pattern — all tests pass, file
reported failed, clean re-run — is from several occurrences.
I am happy to gather more if it would help narrow this: a specific reporter
combination,
--test-concurrencysetting, or an approach to collecting a crashdump on a GitHub-hosted Windows runner.