Skip to content

Commit

Permalink
test: auto stops after error caolan#988
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Dec 30, 2015
1 parent b9cc289 commit f556b20
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test-async.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,22 @@ exports['auto prevent dead-locks due to cyclic dependencies'] = function(test) {
test.done();
};

// Issue 988 on github: https://github.com/caolan/async/issues/988
exports['auto stops running tasks on error'] = function(test) {
async.auto({
task1: function (callback) {
callback('error');
},
task2: function (callback) {
test.ok(false, 'test2 should not be called');
callback();
}
}, 1, function (error) {
test.equal(error, 'error', 'finishes with error');
test.done();
});
};

// Issue 306 on github: https://github.com/caolan/async/issues/306
exports['retry when attempt succeeds'] = function(test) {
var failed = 3;
Expand Down

0 comments on commit f556b20

Please sign in to comment.