Description
openedon Aug 1, 2017
The title of this issue is the crux. It appears that the default spec
reporter uses console.log
rather than the built-in process.stdout
that other reporters use. And there doesn't seem to be a pattern to which reporters use which output method.
Some reporters like spec (https://github.com/mochajs/mocha/blob/master/lib/reporters/spec.js#L40) are using console.log, some like dot(
Line 31 in 503627c
My use case involves utilizing headless chrome to run mocha tests. I'm providing a proxy to window.mocha.process.stdout
to use a message bus that I've injected, that pipes raw messages back to the node app which catches them via the Chrome DevTools Protocol. It might sound complex, but it's rather simple. Without knowing which actor (user code or mocha) is calling console.log
, I can't effectively show console messages in the terminal with any distinction between actors.
The "simple" fix would be to standardize all reports on one output method - preferably mocha.process.stdout
.