diff options
author | B Paul Anderson <benpaul.anderson@gmail.com> | 2016-05-02 19:11:42 -0500 |
---|---|---|
committer | B Paul Anderson <benpaul.anderson@gmail.com> | 2016-05-02 19:11:50 -0500 |
commit | 2209027e0b6479edc7243edfc02c951335a7cf8d (patch) | |
tree | 287d56277101f87160b54a84057d9c3c7a4e5551 /mocha_test | |
parent | 9c6e43c719d30f654c71a3b089ca8a5f15d8180a (diff) | |
download | async-2209027e0b6479edc7243edfc02c951335a7cf8d.tar.gz |
Add failing test based on github issue #1092
Diffstat (limited to 'mocha_test')
-rw-r--r-- | mocha_test/auto.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mocha_test/auto.js b/mocha_test/auto.js index fb779ee..49fac6a 100644 --- a/mocha_test/auto.js +++ b/mocha_test/auto.js @@ -305,6 +305,23 @@ describe('auto', function () { done(); }); + // Issue 1092 on github: https://github.com/caolan/async/issues/1092 + it('extended cycle detection', function(done) { + var task = function (name) { + return function (results, callback) { + callback(null, 'task ' + name); + }; + }; + expect(function () { + async.auto({ + a: ['c', task('a')], + b: ['a', task('b')], + c: ['b', task('c')] + }); + }).to.throw(); + done(); + }); + // Issue 988 on github: https://github.com/caolan/async/issues/988 it('auto stops running tasks on error', function(done) { async.auto({ |