Comparing version 0.1.0 to 0.1.1
@@ -22,2 +22,3 @@ var util = require('util'); | ||
return function thecallback(err) { | ||
if (done) return; | ||
if (util.isError(err)) { | ||
@@ -24,0 +25,0 @@ done = true; |
{ | ||
"name": "after-all", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Execute several async functions and get a callback when they are all done", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -107,2 +107,20 @@ var afterAll = require('../index'); | ||
}); | ||
it('should only call the final callback once in the case of an error', function() { | ||
var count = 0; | ||
var next = afterAll(function() { | ||
(++count === 1).should.be.ok; | ||
}); | ||
var n1 = next(); | ||
var n2 = next(); | ||
var n3 = next(); | ||
n1(); | ||
n2(new Error('Oops!')); | ||
n3(new Error('Oops!')); | ||
}); | ||
}); |
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
6844
8
130