summaryrefslogtreecommitdiff
path: root/test/each.js
diff options
context:
space:
mode:
authorAlex Early <alexander.early@gmail.com>2018-07-01 17:54:54 -0700
committerGitHub <noreply@github.com>2018-07-01 17:54:54 -0700
commit6405b109fe60541ff42d7638ac891d321d6a7bb3 (patch)
treeb6e48ce31446c7cd77a7fc62fe39d62ede8f5c36 /test/each.js
parent53f613039af68353371c2953446fa8084b3fc86b (diff)
downloadasync-6405b109fe60541ff42d7638ac891d321d6a7bb3.tar.gz
limits of less than 1 are now an error (#1552)
* BREAKING CHANGE: limits of less than 1 are now an error * fix lint
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) {