Comparing version 0.1.3 to 0.1.4
12
index.js
@@ -19,2 +19,3 @@ var createDefaultStream = require('./lib/default_stream'); | ||
var running = false; | ||
var count = 0; | ||
@@ -25,2 +26,3 @@ var began = false; | ||
var test = function (name, conf, cb) { | ||
count++; | ||
var t = new Test(name, conf, cb); | ||
@@ -55,2 +57,3 @@ if (!conf || typeof conf !== 'object') conf = conf_ || {}; | ||
t.on('test', function sub (st) { | ||
count++; | ||
st.on('test', sub); | ||
@@ -65,3 +68,3 @@ st.on('end', onend); | ||
function onend () { | ||
running = false; | ||
count--; | ||
if (this._progeny.length) { | ||
@@ -77,6 +80,9 @@ var unshifts = this._progeny.map(function (st) { | ||
} | ||
process.nextTick(function () { | ||
running = false; | ||
if (pending.length) return pending.shift()(); | ||
out.close(); | ||
if (count === 0) { | ||
out.close(); | ||
} | ||
if (conf.exit !== false && canExit && !t._ok) { | ||
@@ -83,0 +89,0 @@ process.exit(1); |
{ | ||
"name" : "tape", | ||
"version" : "0.1.3", | ||
"version" : "0.1.4", | ||
"description" : "tap-producing test harness for node and browsers", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45954
33
1339