Skip to content

Commit 3a875a5

Browse files
committed
Test: Remove redundant Mocha stdout override
Per d7d0396, the Mocha integration test isn't working currently. This presumably existed because Mocha either couldn't handle nested state well, or was causing noise in the output from the nested test. However in practice what happened is that it never restored, and hid the rest of our own top-level test, and given the test was failing it also subsequently caused there to not be any non-zero exit code for CI to fail the build. It seems to be redundant, because simply removing this means errors are coming through properly, and there does not appear to be any noise in the output from the nested test.
1 parent d7d0396 commit 3a875a5

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

test/integration/adapters-run.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,11 @@ module.exports = {
3939

4040
Mocha: function (attachListeners) {
4141
const mocha = new Mocha();
42-
const origWrite = process.stdout.write;
43-
4442
mocha.addFile(path.join(testDir, 'mocha.js'));
4543

4644
const mochaRunner = new JsReporters.MochaAdapter(mocha);
4745

4846
attachListeners(mochaRunner);
49-
50-
// Surpress output, so that Mocha's default reporter output will not be
51-
// displayed during testing.
52-
process.stdout.write = function () {};
53-
54-
mocha.run(function () {
55-
// Restore output.
56-
process.stdout.write = origWrite;
57-
});
47+
mocha.run();
5848
}
5949
};

0 commit comments

Comments
 (0)