Skip to content

Commit a7f5c7f

Browse files
committed
Wrap async function in eval so it doesn't cause syntax errors
1 parent 1efe000 commit a7f5c7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/node/types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ for (const [ getValue, _method ] of [
3434
[ function() { return Object(BigInt(0)); }, 'isBigIntObject' ],
3535
[ function() { return new Error(); }, 'isNativeError' ],
3636
[ function() { return new RegExp(); } ],
37-
[ function() { return async function() {}; }, 'isAsyncFunction' ],
37+
[ function() { return eval('(async function() {})'); }, 'isAsyncFunction' ],
3838
[ function() { return function*() {}; }, 'isGeneratorFunction' ],
3939
[ function() { return (function*() {})(); }, 'isGeneratorObject' ],
4040
[ function() { return Promise.resolve(); } ],

0 commit comments

Comments
 (0)