-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON reporter doesn't work (no output) #2433
Comments
It looks like Mocha (by default) catches and collects the uncaught exceptions, but at the time when this one is thrown, the reporter’s output is already prepared, and so this particular error is lost. 😑 One way to fix this is I guess to watch and cut the circular references in the |
Good catch! Thank you for your work @gurdiga. I don't see a reason not to merge you fix 😄 That's exactly what I was noticing on my Linux distro (with slightly older mocha and node) where JSON reporter was blowing up on circular references. With newer mocha and node on Mac OS, the reporter was just going silent. As a workaround on old Mocha folks can use |
The |
as noted in #2559, I was wrong about the function (my bad) |
) original work by @jeversmann; continuation of PR mochajs#2559 Signed-off-by: Christopher Hiller <[email protected]>
The issue occur to me on mocha v3.0.2 and node v5.8.0 on Mac OS X. Here's my test file
and the code I'm testing
With
json-stream
reporter everything works fine:but with the json reporter nothing comes out:
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: