diff options
author | Alexander Early <alexander.early@gmail.com> | 2018-04-14 20:10:29 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2018-04-14 20:10:29 -0700 |
commit | 45e2938cfa536fe27898c60a4e0fe37080c880bb (patch) | |
tree | c0cb0776b596908d1a79f77c1a30a138dcba6a00 /mocha_test/asyncFunctions.js | |
parent | 2030f5f1bd01a141ac4c85d3deab927f49e255fc (diff) | |
parent | 3235c8f5f67ff38b85ce6f9664053d0b1897ff3b (diff) | |
download | async-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.js | 13 |
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); |