🐛 Bug: infinite loop in parallel tests with uncaught error containing circular dependency #5209
Closed
3 of 4 tasks
Labels
status: accepting prs
Mocha can use your help with this one!
type: bug
a defect, confirmed by a maintainer
Bug Report Checklist
faq
label, but none matched my issue.Expected
Test should report uncaught error (even with circular dependency) as failure and stop execution.
Actual
Test runs in infinite loop until configured timeout.
Minimal, Reproducible Example
npx mocha
not in parallel mode, output is correct:npx mocha --parallel
, infinite loop happens (nothing in console)Versions
mocha: 10.7.3
node: v20.16.0
Additional Info
Issue is introduced in this commit: d7013dd which changed the passed object to breakCircularDeps
Using v10.7.0, the uncaught error is reported correctly in parallel mode:
In my actual project, this
pairs
array grows infinitely as a result of the circular dependency:The text was updated successfully, but these errors were encountered: