Skip to content

Commit 78c7b77

Browse files
author
James Halliday
committed
partial fix for v0.10 exiting early
1 parent 95f1bb4 commit 78c7b77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ function createHarness (conf_) {
4444
exitInterval = !exitInterval && conf_.exit !== false && canEmitExit
4545
&& typeof process._getActiveHandles === 'function'
4646
&& setInterval(function () {
47-
if (process._getActiveHandles().length === 1) {
47+
if (/^v0\.8\./.test(process.version)
48+
&& process._getActiveHandles().length === 1) {
4849
tests.forEach(function (t) { t._exit() });
4950
}
5051
}, 200);
@@ -124,7 +125,7 @@ function createHarness (conf_) {
124125
pending.unshift.apply(pending, unshifts);
125126
}
126127

127-
nextTick(function () {
128+
process.nextTick(function () {
128129
running = false;
129130
if (pending.length) return pending.shift()();
130131
if (count === 0 && !closed) {

0 commit comments

Comments
 (0)