From 2fc3ab83d79cd660d39355a4ad51897d6f8c3b70 Mon Sep 17 00:00:00 2001 From: Sheile Date: Fri, 20 Jan 2012 13:00:09 +0900 Subject: [PATCH] Add test for auto problem about task sequence --- test/test-async.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test-async.js b/test/test-async.js index d3eeddcb5..104293f7f 100644 --- a/test/test-async.js +++ b/test/test-async.js @@ -101,6 +101,16 @@ exports['auto no callback'] = function(test){ }); }; +// Issue 24 on github: https://github.com/caolan/async/issues#issue/24 +// Issue 76 on github: https://github.com/caolan/async/issues#issue/76 +exports['auto removeListener has side effect on loop iterator'] = function(test) { + async.auto({ + task1: ['task3', function(callback) { test.done() }], + task2: ['task3', function(callback) { /* by design: DON'T call callback */ }], + task3: function(callback) { callback(); }, + }); +}; + exports['waterfall'] = function(test){ test.expect(6); var call_order = [];