From ade570d379f7ad5c35fb50c1166c6b25a347cddc Mon Sep 17 00:00:00 2001 From: Graeme Yeates Date: Mon, 20 Jul 2015 00:02:09 -0400 Subject: Add test coverage of retry errors --- test/test-async.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') 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; -- cgit v1.2.1