Skip to content

Commit

Permalink
fix: listen to the beforeExit event instead of calling nextTick
Browse files Browse the repository at this point in the history
  • Loading branch information
kl0tl committed Feb 13, 2016
1 parent d2f573c commit 099488d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Test.prototype.test = function (name, opts, cb) {
});
}

nextTick(function() {
process.once('beforeExit', function() {
if (!self._plan && self.pendingCount == self._progeny.length) {
self._end();
}
Expand Down

0 comments on commit 099488d

Please sign in to comment.