Closed tripodsan closed 5 months ago
here a debugging session:
Can also be reproduced by using the min
builtin mocha reporter for some test that produces no output.
I have also noticed it to be an issue when using mocha-junit-reporter (no problems with 0.3.1) same error as above gets written to the junit output file
workaround add a setup hook:
package.json
....
"mocha": {
"require": [
"test/setup-env.js",
],
},
...
test/setup-env.js
export const mochaHooks = {
beforeEach() {
process.stderr.write('');
},
};
problem I have a test with no output, then I get the following error:
workaround add
process.stdout.write('')
note I'm running the tests within webstorm, and they set their own reporter:
I assume they don't write anything to stdout.