diff options
Diffstat (limited to 'test/test-async.js')
-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 25e964e..fe94ddc 100755 --- a/test/test-async.js +++ b/test/test-async.js @@ -2236,6 +2236,24 @@ exports['some early return'] = function(test){ }, 100); }; +exports['someLimit true'] = function(test){ + async.someLimit([3,1,2], 2, function(x, callback){ + setTimeout(function(){callback(x === 2);}, 0); + }, function(result){ + test.equals(result, true); + test.done(); + }); +}; + +exports['someLimit false'] = function(test){ + async.someLimit([3,1,2], 2, function(x, callback){ + setTimeout(function(){callback(x === 10);}, 0); + }, function(result){ + test.equals(result, false); + test.done(); + }); +}; + exports['any alias'] = function(test){ test.equals(async.any, async.some); test.done(); |