Skip to content

Commit

Permalink
updated SIGINT handler - as per comments in #3570
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayasankar-m committed Dec 11, 2018
1 parent 6df0e84 commit 0b82639
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/cli/run-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ exports.singleRun = (mocha, {files = [], exit = false} = {}) => {
// Instead of `process.exit(130)`, set runner.failures to 130 (exit code for SIGINT)
// The amount of failures will be emitted as error code later
runner.failures = 130;
setImmediate(() => process.kill(process.pid, 'SIGINT'));
});
};

Expand Down

0 comments on commit 0b82639

Please sign in to comment.