[Pkg-javascript-commits] [node-async] 369/480: Failing auto double callback on error test
Jonas Smedegaard
js at moszumanska.debian.org
Fri May 2 08:58:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository node-async.
commit e61160d03b8955f5c01d6caed476e4c9a6076a4a
Author: James Cox <th3james at gmail.com>
Date: Mon Dec 2 21:20:52 2013 +0000
Failing auto double callback on error test
---
test/test-async.js | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/test/test-async.js b/test/test-async.js
index ff401e7..39d61be 100755
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -431,6 +431,27 @@ exports['auto removeListener has side effect on loop iterator'] = function(test)
});
};
+// Issue 410 on github: https://github.com/caolan/async/issues/410
+exports['auto calls callback multiple times'] = function(test) {
+ var finalCallCount = 0;
+ async.auto({
+ task1: function(callback) { callback(null); },
+ task2: ['task1', function(callback) { callback(null); }]
+ },
+
+ // Final callback. This should only run once...
+ function(err) {
+ finalCallCount++;
+ console.log('Called ' + finalCallCount + ' times');
+ if (finalCallCount > 1) {
+ test.done(new Error("Final auto callback should only be called once"));
+ } else {
+ test.done();
+ throw new Error("An error");
+ }
+ });
+};
+
exports['waterfall'] = function(test){
test.expect(6);
var call_order = [];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git
More information about the Pkg-javascript-commits
mailing list