diff options
author | Alexander Early <alexander.early@gmail.com> | 2019-06-22 20:41:15 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2019-06-22 20:41:15 -0700 |
commit | c52c887495ef031cfd9ebdf588a13916d1e90ba5 (patch) | |
tree | dba31084885a064b5c50b343f239a15bd75c5aa3 /test/es2017 | |
parent | b5c3f2f462beb73b08c4459ebffe0d748a6e0ddb (diff) | |
download | async-c52c887495ef031cfd9ebdf588a13916d1e90ba5.tar.gz |
moar coverage
Diffstat (limited to 'test/es2017')
-rw-r--r-- | test/es2017/awaitableFunctions.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/es2017/awaitableFunctions.js b/test/es2017/awaitableFunctions.js index a5c9e7b..de54e8f 100644 --- a/test/es2017/awaitableFunctions.js +++ b/test/es2017/awaitableFunctions.js @@ -562,6 +562,17 @@ module.exports = function () { expect(calls).to.eql([0, 1, 2]) }); + it('should return a Promise: retry (multiple cb args)', async () => { + expect (async.retry.name).to.contain('retry') + let counter = 0 + const results = await async.retry((cb) => { + counter++ + if (counter < 3) return cb(new Error()) + cb(null, 0, 1, 2) + }) + expect(results).to.eql([0, 1, 2]) + }); + it('should return a Promise: tryEach', async () => { expect (async.tryEach.name).to.contain('tryEach') const calls = [] |