diff options
author | Alex Early <alexander.early@gmail.com> | 2018-07-08 16:58:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-08 16:58:36 -0700 |
commit | e4751178540a3c6e64598b93977481ec599704d2 (patch) | |
tree | dce5731bdb1076971d2e4a0a42fbe0d95c720185 /test/until.js | |
parent | 6405b109fe60541ff42d7638ac891d321d6a7bb3 (diff) | |
download | async-e4751178540a3c6e64598b93977481ec599704d2.tar.gz |
ES6-ify codebase (#1553)
* cancelable foreach
* cancelable waterfall
* cancellable auto
* fix lint
* fix tests
* cancelable whilst/until/during/forever
* fix waterfall test. It WILL get there
* docs
* use rest params instead of slice
* clean up internals
* remove property func
* clarify uses of createTester
* happy path async funtions in asyncify
* stop using arguments
* DLL to class
* moar arrows
* fix merge issues
* remove forOwn
* moar arrows
* fix merge mistake
* even more arrows, what can stop him
* mo more fn.apply(null,...)
* remove more spurious uses of apply
* update lint config
* just when you thought there couldn't possibly be more arrows
* use eslint:recommended
* even less uses or aguments
* get rid of prototype cuteness
* fix concat tests
* fix more tests
Diffstat (limited to 'test/until.js')
-rw-r--r-- | test/until.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/until.js b/test/until.js index 2b82fe1..9ea0605 100644 --- a/test/until.js +++ b/test/until.js @@ -2,22 +2,22 @@ var async = require('../lib'); var expect = require('chai').expect; var assert = require('assert'); -describe('until', function(){ - it('until', function(done) { +describe('until', () => { + it('until', (done) => { var call_order = []; var count = 0; async.until( - function (c) { + (c) => { expect(c).to.equal(undefined); call_order.push(['test', count]); return (count == 5); }, - function (cb) { + (cb) => { call_order.push(['iteratee', count]); count++; cb(null, count); }, - function (err, result) { + (err, result) => { assert(err === null, err + " passed instead of 'null'"); expect(result).to.equal(5, 'last result passed through'); expect(call_order).to.eql([ @@ -50,21 +50,21 @@ describe('until', function(){ }, 10) }) - it('doUntil', function(done) { + it('doUntil', (done) => { var call_order = []; var count = 0; async.doUntil( - function (cb) { + (cb) => { call_order.push(['iteratee', count]); count++; cb(null, count); }, - function (c) { + (c) => { expect(c).to.equal(count); call_order.push(['test', count]); return (count == 5); }, - function (err, result) { + (err, result) => { assert(err === null, err + " passed instead of 'null'"); expect(result).to.equal(5, 'last result passed through'); expect(call_order).to.eql([ @@ -80,20 +80,20 @@ describe('until', function(){ ); }); - it('doUntil callback params', function(done) { + it('doUntil callback params', (done) => { var call_order = []; var count = 0; async.doUntil( - function (cb) { + (cb) => { call_order.push(['iteratee', count]); count++; cb(null, count); }, - function (c) { + (c) => { call_order.push(['test', c]); return (c == 5); }, - function (err, result) { + (err, result) => { if (err) throw err; expect(result).to.equal(5, 'last result passed through'); expect(call_order).to.eql([ |