diff options
author | Alexander Early <alexander.early@gmail.com> | 2019-05-19 16:55:12 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2019-05-19 16:55:12 -0700 |
commit | 8a38129f8ee6eae45feb8a8f4d8865e8427bf921 (patch) | |
tree | 6f411c9262c74957b670a680b58f61040fc970f5 | |
parent | 43d94d3828ad8b19af79ecf9efa6b5da8eac4ead (diff) | |
download | async-8a38129f8ee6eae45feb8a8f4d8865e8427bf921.tar.gz |
fix tests in firefox
-rw-r--r-- | test/es2017/awaitableFunctions.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/es2017/awaitableFunctions.js b/test/es2017/awaitableFunctions.js index ccf9baf..4517fe7 100644 --- a/test/es2017/awaitableFunctions.js +++ b/test/es2017/awaitableFunctions.js @@ -579,11 +579,12 @@ module.exports = function () { }, 5) const calls = [] - - q.error().catch(d => calls.push('error ' + d)) + const errorCalls = [] + const emptyCalls = [] + q.error().catch(d => errorCalls.push('error ' + d)) q.saturated().then(() => calls.push('saturated')) q.unsaturated().then(() => calls.push('unsaturated')) - q.empty().then(() => calls.push('empty')) + q.empty().then(() => emptyCalls.push('empty')) q.push(1).then(d => calls.push('push cb ' + d)) q.push(2).then(d => calls.push('push cb ' + d)) @@ -602,12 +603,17 @@ module.exports = function () { 'push cb 3', 'push cb 4', 'push cb 5', - 'empty', - 'error Error: oh noes', 'push cb 7', 'unsaturated', 'push cb 8' ]) + + expect(errorCalls).to.eql([ + 'error Error: oh noes', + ]) + expect(emptyCalls).to.eql([ + 'empty', + ]) }) /* |