summaryrefslogtreecommitdiff
path: root/mocha_test/asyncFunctions.js
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2018-04-14 20:10:29 -0700
committerAlexander Early <alexander.early@gmail.com>2018-04-14 20:10:29 -0700
commit45e2938cfa536fe27898c60a4e0fe37080c880bb (patch)
treec0cb0776b596908d1a79f77c1a30a138dcba6a00 /mocha_test/asyncFunctions.js
parent2030f5f1bd01a141ac4c85d3deab927f49e255fc (diff)
parent3235c8f5f67ff38b85ce6f9664053d0b1897ff3b (diff)
downloadasync-DELETE_THIS_BRANCH.tar.gz
Merge branch 'master' into DELETE_THIS_BRANCHDELETE_THIS_BRANCH
Diffstat (limited to 'mocha_test/asyncFunctions.js')
-rw-r--r--mocha_test/asyncFunctions.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/mocha_test/asyncFunctions.js b/mocha_test/asyncFunctions.js
index b756a90..3b759e1 100644
--- a/mocha_test/asyncFunctions.js
+++ b/mocha_test/asyncFunctions.js
@@ -1,4 +1,15 @@
-var supportsAsync = require('../lib/internal/wrapAsync').supportsAsync;
+var isAsync = require('../lib/internal/wrapAsync').isAsync;
+
+function supportsAsync() {
+ var supported;
+ try {
+ /* eslint no-eval: 0 */
+ supported = isAsync(eval('(async function () {})'));
+ } catch (e) {
+ supported = false;
+ }
+ return supported;
+}
describe('async function support', function () {
this.timeout(100);