The question does not indicate what the journal will be used for. If you need stack traces in a report, you cannot use json-stream , because this reporter does not include traces. However, if you want, this is something that can be trivially analyzed, and only you care about knowing the status of the tests, and not about why they failed, then the json-stream reporter works great:
$ mocha -R json-stream > report
You get a list of regularly formatted lines:
["start",{"total":1}] ["fail",{"title":"q","fullTitle":"blah q"}] ["end",{"suites":1,"tests":1,"passes":0,"pending":0,"failures":1,"start":"2014-01-08T18:10:27.764Z","end":"2014-01-08T18:10:27.768Z","duration":4}]
Then you can easily grep for failed tests:
$ grep '^\["fail"' report
The output can also be transferred to the tool, which narrows it to the desired one and formats it to go in an email, chat message or something else. I used this method quite often when running a test suite with thousands of tests in which what I cared about most quickly got a list of unsuccessful ones.
Louis source share