Skip to content

Commit

Permalink
add event handler for Node v8
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Sep 17, 2019
1 parent 8c68fe5 commit 5b63b8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/runner.js
Expand Up @@ -917,6 +917,11 @@ Runner.prototype.run = function(fn) {
this.on(constants.EVENT_RUN_END, function() {
debug(constants.EVENT_RUN_END);
process.removeListener('uncaughtException', uncaught);
process.on('uncaughtException', function(err) {
// TODO: remove this listener when Node v8 support is dropped
console.error('\n', err);
process.exit(1);
});
fn(self.failures);
});

Expand Down

0 comments on commit 5b63b8e

Please sign in to comment.