diff options
author | Graeme Yeates <yeatesgraeme@gmail.com> | 2015-07-02 11:28:52 -0400 |
---|---|---|
committer | Graeme Yeates <yeatesgraeme@gmail.com> | 2015-07-02 11:28:52 -0400 |
commit | c61e63b357262f627d945bd0f41aeaa02b95c361 (patch) | |
tree | c1e6368daea4db01b4e7ec520c563900218676e4 /test | |
parent | 06813bffd737a183d01e0fa89d70a31635019676 (diff) | |
download | async-c61e63b357262f627d945bd0f41aeaa02b95c361.tar.gz |
Add everyLimit
Diffstat (limited to 'test')
-rwxr-xr-x | test/test-async.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test-async.js b/test/test-async.js index fe94ddc..b7847bf 100755 --- a/test/test-async.js +++ b/test/test-async.js @@ -2254,6 +2254,24 @@ exports['someLimit false'] = function(test){ }); }; +exports['every true'] = function(test){ + async.everyLimit([3,1,2], 1, function(x, callback){ + setTimeout(function(){callback(x > 1);}, 0); + }, function(result){ + test.equals(result, true); + test.done(); + }); +}; + +exports['everyLimit false'] = function(test){ + async.everyLimit([3,1,2], 2, function(x, callback){ + setTimeout(function(){callback(x === 2);}, 0); + }, function(result){ + test.equals(result, false); + test.done(); + }); +}; + exports['any alias'] = function(test){ test.equals(async.any, async.some); test.done(); |