Comparing version 0.2.0 to 0.2.1
20
index.js
@@ -29,2 +29,3 @@ var createDefaultStream = require('./lib/default_stream'); | ||
var began = false; | ||
var only = false; | ||
var out = new Render(); | ||
@@ -41,3 +42,5 @@ | ||
out.close(); | ||
if (!code && !t._ok) process.exit(1); | ||
if (!code && !t._ok && (!only || name === only)) { | ||
process.exit(1); | ||
} | ||
}); | ||
@@ -57,2 +60,7 @@ } | ||
if (only && name !== only) { | ||
count--; | ||
return; | ||
} | ||
if (running || pending.length) { | ||
@@ -100,2 +108,12 @@ pending.push(run); | ||
test.only = function (name) { | ||
if (only) { | ||
throw new Error("there can only be one only test"); | ||
} | ||
only = name; | ||
return test.apply(null, arguments); | ||
}; | ||
test.stream = out; | ||
@@ -102,0 +120,0 @@ return test; |
@@ -106,3 +106,3 @@ var EventEmitter = require('events').EventEmitter; | ||
actual : defined(extra.actual, opts.actual), | ||
expected : defined(extra.expected, opts.expected), | ||
expected : defined(extra.expected, opts.expected) | ||
}; | ||
@@ -109,0 +109,0 @@ this._ok = Boolean(this._ok && ok); |
{ | ||
"name" : "tape", | ||
"version" : "0.2.0", | ||
"version" : "0.2.1", | ||
"description" : "tap-producing test harness for node and browsers", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
Sorry, the diff of this file is not supported yet
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
49020
36
1431
181