馃悰 Bug: mocha fails silently on invalid package.json
section
#5141
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
I made an error in my
package.json
(an extra comma) because JSON is a bad format for configuration files ;-) like this:I expected
mocha
to give me an error, ideally a bit friendlier than the one fromnpm
, but something like that:Actual
Mocha just failed as if I hadn't configured it at all. This was very confusing:
Minimal, Reproducible Example
See "expected" above but basically:
then add the offending section to
package.json
, then createfoo.spec.js
, then try to runmocha
.Versions
10.4.0 10.4.0 v20.11.0
Additional Info
I could definitely provide a PR if you could direct me to the appropriate place in the code (with which I am not familiar)
The text was updated successfully, but these errors were encountered: