Comparing version 0.3.2 to 0.3.3
26
index.js
@@ -19,2 +19,7 @@ var createDefaultStream = require('./lib/default_stream'); | ||
var nextTick = typeof setImmediate !== 'undefined' | ||
? setImmediate | ||
: process.nextTick | ||
; | ||
exports = module.exports = createHarness(); | ||
@@ -52,4 +57,6 @@ exports.createHarness = createHarness; | ||
out.on('end', function () { | ||
clearInterval(exitInterval); | ||
if (canExit && conf_.exit !== false) process.exit(exitCode); | ||
nextTick(function () { | ||
clearInterval(exitInterval); | ||
if (canExit && conf_.exit !== false) process.exit(exitCode); | ||
}); | ||
}); | ||
@@ -76,3 +83,3 @@ | ||
process.nextTick(function () { | ||
nextTick(function () { | ||
if (!out.piped) out.pipe(createDefaultStream()); | ||
@@ -113,3 +120,3 @@ if (!began) out.begin(); | ||
if (this._progeny.length) { | ||
var unshifts = this._progeny.map(function (st) { | ||
var unshifts = map(this._progeny, function (st) { | ||
return function () { | ||
@@ -124,3 +131,3 @@ running = true; | ||
process.nextTick(function () { | ||
nextTick(function () { | ||
running = false; | ||
@@ -153,2 +160,11 @@ if (pending.length) return pending.shift()(); | ||
function map (xs, f) { | ||
if (xs.map) return xs.map(f); | ||
var res = []; | ||
for (var i = 0; i < xs.length; i++) { | ||
res.push(f(xs[i])); | ||
} | ||
return res; | ||
} | ||
// vim: set softtabstop=4 shiftwidth=4: |
@@ -8,2 +8,7 @@ var EventEmitter = require('events').EventEmitter; | ||
var nextTick = typeof setImmediate !== 'undefined' | ||
? setImmediate | ||
: process.nextTick | ||
; | ||
Test.prototype = new EventEmitter; | ||
@@ -141,3 +146,3 @@ | ||
if (self._plan === self.assertCount) { | ||
process.nextTick(function () { | ||
nextTick(function () { | ||
if (!self.ended) self.end(); | ||
@@ -144,0 +149,0 @@ }); |
{ | ||
"name" : "tape", | ||
"version" : "0.3.2", | ||
"version" : "0.3.3", | ||
"description" : "tap-producing test harness for node and browsers", | ||
@@ -23,2 +23,13 @@ "main" : "index.js", | ||
}, | ||
"testling" : { | ||
"files" : "test/browser/*.js", | ||
"browsers" : [ | ||
"ie/6..latest", | ||
"chrome/20..latest", | ||
"firefox/10..latest", | ||
"safari/latest", | ||
"opera/11.0..latest", | ||
"iphone/6", "ipad/6" | ||
] | ||
}, | ||
"repository" : { | ||
@@ -25,0 +36,0 @@ "type" : "git", |
Sorry, the diff of this file is not supported yet
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
183
16
53979
41
1584