🐛 Bug: Tests pass without running after uncaught exception #5251
Labels
status: in triage
a maintainer should (re-)triage (review) this issue
type: bug
a defect, confirmed by a maintainer
Bug Report Checklist
faq
label, but none matched my issue.Expected
If an uncaught exception occurs, I would think Mocha should report a failure and continue running subsequent tests.
Actual
If a test throws an error inside a
process.nextTick
callback, Mocha correctly reports that test failing, but then doesn't run subsequent tests. It reports them as passed.For example, in the MRE, there are three tests -
a
,b
, andc
- andb
throws an error insideprocess.nextTick
. The report is:Minimal, Reproducible Example
https://github.com/JoshuaKGoldberg/repros/tree/mocha-skip-test-after-uncaught
Versions
Additional Info
Discovered in #5250 -> 6b5ff68.
Somewhat similar-looking to #5184 but not the same.
The text was updated successfully, but these errors were encountered: