-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Description
Bug Report Checklist
- I have read and agree to Mocha's Code of Conduct and Contributing Guidelines
- I have searched for related issues and issues with the
faq
label, but none matched my issue. - I have 'smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, my usage of Mocha, or Mocha itself.
- I want to provide a PR to resolve this
Expected
Tests should run perfectly even if a it
block (test) is failing
Error in it block (test) should not break parallel-buffered-runner.js
even if --allow-uncaught
is passed
Actual
All the tests get executed in the expected behaviour, but before the EVENT_RUN_END the process fails while serializing the results with the below error:
/XXX/node_modules/mocha/lib/nodejs/parallel-buffered-runner.js:357
throw err;
TypeError: Cannot set property maxHeaderSize of #<Object> which has only a getter
at _breakCircularDeps (/XXX/node_modules/mocha/lib/utils.js:679:16)
at _breakCircularDeps (/XXXnode_modules/mocha/lib/utils.js:679:18)
at _breakCircularDeps (/XXX/node_modules/mocha/lib/utils.js:679:18)
at _breakCircularDeps (/XXX/node_modules/mocha/lib/utils.js:679:18)
at _breakCircularDeps (/XXX/node_modules/mocha/lib/utils.js:679:18)
at _breakCircularDeps (/XXX/node_modules/mocha/lib/utils.js:679:18)
at _breakCircularDeps (/XXX/node_modules/mocha/lib/utils.js:679:18)
at _breakCircularDeps (/XXX/node_modules/mocha/lib/utils.js:679:18)
at _breakCircularDeps (/XXX/node_modules/mocha/lib/utils.js:679:18)
at _breakCircularDeps (/XXX/node_modules/mocha/lib/utils.js:679:18)
Failure point:
Reason: Trying to set a read-only property, which only has a getter
Minimal, Reproducible Example
Config:
- allow-uncaught: true
- parallel: true
Library dependency (easy to reproduce):
axios: 1.6.8
Create a suite, create a test in it, and make an incorrect/failing API call
Run the tests it will break
Versions
Mocha version: 10.7.0
Node: v20.15.1
OS: MacOS Sonoma 14.2.1 (23C71)
Additional Info
No response
Metadata
Metadata
Assignees
Labels
status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer