Skip to content

Commit

Permalink
partial fix for v0.10 exiting early
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Apr 28, 2013
1 parent 95f1bb4 commit 78c7b77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ function createHarness (conf_) {
exitInterval = !exitInterval && conf_.exit !== false && canEmitExit
&& typeof process._getActiveHandles === 'function'
&& setInterval(function () {
if (process._getActiveHandles().length === 1) {
if (/^v0\.8\./.test(process.version)
&& process._getActiveHandles().length === 1) {
tests.forEach(function (t) { t._exit() });
}
}, 200);
Expand Down Expand Up @@ -124,7 +125,7 @@ function createHarness (conf_) {
pending.unshift.apply(pending, unshifts);
}

nextTick(function () {
process.nextTick(function () {
running = false;
if (pending.length) return pending.shift()();
if (count === 0 && !closed) {
Expand Down

0 comments on commit 78c7b77

Please sign in to comment.