Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions lib/internal/test_runner/harness.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ const {
ERR_TEST_FAILURE,
},
} = require('internal/errors');
const { getOptionValue } = require('internal/options');
const { Test, ItTest, Suite } = require('internal/test_runner/test');


const isTestRunner = getOptionValue('--test');
const testResources = new SafeMap();
const root = new Test({ __proto__: null, name: '<root>' });
let wasRootSetup = false;
Expand Down Expand Up @@ -134,8 +135,11 @@ function setup(root) {
process.on('uncaughtException', exceptionHandler);
process.on('unhandledRejection', rejectionHandler);
process.on('beforeExit', exitHandler);
process.on('SIGINT', terminationHandler);
process.on('SIGTERM', terminationHandler);
// TODO (MoLow): Make it configurable too hook when isTestRunner === false
Comment thread
MoLow marked this conversation as resolved.
Outdated
if (isTestRunner) {
process.on('SIGINT', terminationHandler);
process.on('SIGTERM', terminationHandler);
}

root.reporter.pipe(process.stdout);
root.reporter.version();
Expand Down