File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -601,6 +601,22 @@ exports['auto prevent dead-locks due to cyclic dependencies'] = function(test) {
601
601
test . done ( ) ;
602
602
} ;
603
603
604
+ // Issue 988 on github: https://github.com/caolan/async/issues/988
605
+ exports [ 'auto stops running tasks on error' ] = function ( test ) {
606
+ async . auto ( {
607
+ task1 : function ( callback ) {
608
+ callback ( 'error' ) ;
609
+ } ,
610
+ task2 : function ( callback ) {
611
+ test . ok ( false , 'test2 should not be called' ) ;
612
+ callback ( ) ;
613
+ }
614
+ } , 1 , function ( error ) {
615
+ test . equal ( error , 'error' , 'finishes with error' ) ;
616
+ test . done ( ) ;
617
+ } ) ;
618
+ } ;
619
+
604
620
// Issue 306 on github: https://github.com/caolan/async/issues/306
605
621
exports [ 'retry when attempt succeeds' ] = function ( test ) {
606
622
var failed = 3 ;
You can’t perform that action at this time.
0 commit comments