summaryrefslogtreecommitdiff
path: root/test/each.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/each.js')
-rw-r--r--test/each.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/each.js b/test/each.js
index 014e9df..ba5f3c4 100644
--- a/test/each.js
+++ b/test/each.js
@@ -199,15 +199,15 @@ describe("each", function() {
});
});
- it('eachLimit zero limit', function(done) {
- async.eachLimit([0,1,2,3,4,5], 0, function(x, callback){
- assert(false, 'iteratee should not be called');
- callback();
- }, function(err){
- if (err) throw err;
- assert(true, 'should call callback');
- });
- setTimeout(done, 25);
+ it('eachLimit zero limit', function() {
+ expect(() => {
+ async.eachLimit([0,1,2,3,4,5], 0, function(x, callback){
+ assert(false, 'iteratee should not be called');
+ callback();
+ }, function(){
+ assert(false, 'should not call callback');
+ });
+ }).to.throw(/limit/)
});
it('eachLimit error', function(done) {