File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 593
593
acc . times = parseInt ( t . times , 10 ) || DEFAULT_TIMES ;
594
594
acc . interval = parseInt ( t . interval , 10 ) || DEFAULT_INTERVAL ;
595
595
} else {
596
- throw new Error ( 'Unsupported argument type for \'times\': ' + typeof ( t ) ) ;
596
+ throw new Error ( 'Unsupported argument type for \'times\': ' + typeof t ) ;
597
597
}
598
598
}
599
599
Original file line number Diff line number Diff line change @@ -728,6 +728,19 @@ exports['retry when all attempts succeeds'] = function(test) {
728
728
} ) ;
729
729
} ;
730
730
731
+ exports [ 'retry fails with invalid arguments' ] = function ( test ) {
732
+ test . throws ( function ( ) {
733
+ async . retry ( "" ) ;
734
+ } ) ;
735
+ test . throws ( function ( ) {
736
+ async . retry ( ) ;
737
+ } ) ;
738
+ test . throws ( function ( ) {
739
+ async . retry ( function ( ) { } , 2 , function ( ) { } ) ;
740
+ } ) ;
741
+ test . done ( ) ;
742
+ } ;
743
+
731
744
exports [ 'retry with interval when all attempts succeeds' ] = function ( test ) {
732
745
var times = 3 ;
733
746
var interval = 500 ;
You can’t perform that action at this time.
0 commit comments