Open boneskull opened 5 years ago
It could be argued Mocha should print these to stdout, but that's how it works right now.
Hmm. Can’t think of a good reason right now. I might have been lazy 😄
There is one problem with having two output streams: The output is buffered partially to detect stack traces and map them back to the original source location using sourcemaps. Therefore it could happen that the outputs of the two streams are misleading, because there might be an offset.
offset meaning incorrect stack trace, or do you mean interleaving? don't understand
The one stream might be flushed while the other is still buffered. This could mean that you see a stack trace in the wrong place.
possible to just buffer both?
Here: https://github.com/mantoni/mochify.js/blob/master/lib/chromium.js#L141
Mochify prints uncaught errors to stdout. It should print these to stderr (which is what Mocha does).
@mantoni Any reason not to do this?
Unclear if the code at https://github.com/mantoni/mochify.js/blob/master/lib/chromium.js#L154 should also do this.