diff options
author | Graeme Yeates <yeatesgraeme@gmail.com> | 2015-07-20 00:02:09 -0400 |
---|---|---|
committer | Graeme Yeates <yeatesgraeme@gmail.com> | 2015-07-20 00:02:24 -0400 |
commit | ade570d379f7ad5c35fb50c1166c6b25a347cddc (patch) | |
tree | a68f45bfdbbaef79abc5f0b69c26cafdf6b663a2 /test | |
parent | f7edbd5afa0c4279d53095bbc4e9991bf519fa04 (diff) | |
download | async-ade570d379f7ad5c35fb50c1166c6b25a347cddc.tar.gz |
Add test coverage of retry errors
Diffstat (limited to 'test')
-rwxr-xr-x | test/test-async.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test-async.js b/test/test-async.js index fdb949b..aeaea5b 100755 --- a/test/test-async.js +++ b/test/test-async.js @@ -728,6 +728,19 @@ exports['retry when all attempts succeeds'] = function(test) { }); }; +exports['retry fails with invalid arguments'] = function(test) { + test.throws(function() { + async.retry(""); + }); + test.throws(function() { + async.retry(); + }); + test.throws(function() { + async.retry(function() {}, 2, function() {}); + }); + test.done(); +}; + exports['retry with interval when all attempts succeeds'] = function(test) { var times = 3; var interval = 500; |