Open cinder-fish opened 3 months ago
See also:
...however, per comments in #2797, it looks like Mocha isn't respecting Node unhandled-rejections
anymore?
$ npx mocha -n unhandled-rejections=strict; echo "mocha status: $?"
causes an unhandled rejection
β throws after 3000ms
1 passing (84ms)
mocha status: 0
Perhaps this is a regression? Needs investigation.
Ok I played around with this more: yes, this is a bug.
parallel
), mocha status: 7
is logged: indicating Mocha failingparallel
, mocha status: 0
is logged: indicating no failing exit codeThe behavior between the default mode & parallel should be the same. An unhandled rejection should be logged & reported.
Bug Report Checklist
faq
label, but none matched my issue.Expected
mocha to run the rests and exit with a non-
0
exit codeActual
mocha exits with
0
and prints the following output
which includes the failing test but not the final summary
Minimal, Reproducible Example
https://github.com/cinder-fish/mocha-parallel-bug
Essentially one test file sets up a timeout which will throw an unhandled error
And another has a failing test that delays long enough that this fires
When run with
parallel: true
this passes despite the failing testWhen run with
parallel: false
this fails as expectedVersions
Additional Info
No response