Skip to content

Commit

Permalink
fix: don’t let timeouts prevent child tests to run
Browse files Browse the repository at this point in the history
If a test is supposed to be implicitly ended by its children a timer will fail it and prevent its children to run.
  • Loading branch information
kl0tl committed Feb 13, 2016
1 parent e3111e8 commit e4d84dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Test.prototype.timeoutAfter = function(ms) {
self.fail('test timed out after ' + ms + 'ms');
self.end();
}, ms);
timeout.unref();
this.once('end', function() {
clearTimeout(timeout);
});
Expand Down

0 comments on commit e4d84dd

Please sign in to comment.