From 2209027e0b6479edc7243edfc02c951335a7cf8d Mon Sep 17 00:00:00 2001 From: B Paul Anderson Date: Mon, 2 May 2016 19:11:42 -0500 Subject: Add failing test based on github issue #1092 --- mocha_test/auto.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mocha_test') 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({ -- cgit v1.2.1