-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
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
Milestone
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
faqlabel, 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
Have a failed test message for the file with syntax error, have reporter calls for the file with error, have dysplaying of other tests like in Node.js test runner (example.zip)
Actual
After call in termical I see only message
Exception during run: SyntaxError... and with Process finished with exit code 1.
Example mocha-for-files-and-file-with-syntax-error.zip
Minimal, Reproducible Example
Example mocha-for-files-and-file-with-syntax-error.zip
- Download the example
- Install dependencies: run
npm iin terminal - Run tests: run
npm run test:filesin terminal - See result.
Versions
mocha version: 11.0.1
Node.js version: 22.3.0 (same for: 20.15.1, 18.17.1, 23.6.0)
macOS: 14.7 (23H124)
MacBook Pro 16-inch, 2021, Apple M1 Max
Terminal: iTerm2 Build 3.5.7, WebStorm 2025.1 EAP
Additional Info
No response
Reactions are currently unavailable
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
Type
Projects
Status
No status