summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGraeme Yeates <yeatesgraeme@gmail.com>2015-07-20 00:02:09 -0400
committerGraeme Yeates <yeatesgraeme@gmail.com>2015-07-20 00:02:24 -0400
commitade570d379f7ad5c35fb50c1166c6b25a347cddc (patch)
treea68f45bfdbbaef79abc5f0b69c26cafdf6b663a2 /test
parentf7edbd5afa0c4279d53095bbc4e9991bf519fa04 (diff)
downloadasync-ade570d379f7ad5c35fb50c1166c6b25a347cddc.tar.gz
Add test coverage of retry errors
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-async.js13
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;