summaryrefslogtreecommitdiff
path: root/mocha_test/es2017/asyncFunctions.js
diff options
context:
space:
mode:
Diffstat (limited to 'mocha_test/es2017/asyncFunctions.js')
-rw-r--r--mocha_test/es2017/asyncFunctions.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/mocha_test/es2017/asyncFunctions.js b/mocha_test/es2017/asyncFunctions.js
index ca76a56..eb282bc 100644
--- a/mocha_test/es2017/asyncFunctions.js
+++ b/mocha_test/es2017/asyncFunctions.js
@@ -615,6 +615,18 @@ module.exports = function () {
})
});
+ it('should handle async functons in tryEach', (done) => {
+ async.tryEach([
+ async () => { throw new Error('fail1'); },
+ async () => { throw new Error('fail2'); },
+ async () => 5,
+ async () => { throw new Error('shoult not get here'); }
+ ], (err, result) => {
+ expect(result).to.eql(5);
+ done();
+ })
+ });
+
/**
* Utils
*/