We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4fdb585 + 90c1b62 commit 27af5b4Copy full SHA for 27af5b4
lib/doctest.js
@@ -56,7 +56,7 @@ const wrapJs = sourceType => test => {
56
const source = formatInput (0) (test.input.lines);
57
const ast = acorn.parse (
58
source.startsWith ('{') && source.endsWith ('}') ? `(${source})` : source,
59
- {ecmaVersion: 2020, sourceType}
+ {ecmaVersion: 2023, sourceType}
60
);
61
const {type} = ast.body[0];
62
if (type !== 'ExpressionStatement') return source;
@@ -260,7 +260,7 @@ const rewriteJs = sourceType => ({
260
const getComments = input => {
261
const comments = [];
262
acorn.parse (input, {
263
- ecmaVersion: 2020,
+ ecmaVersion: 2023,
264
sourceType,
265
locations: true,
266
onComment: comments,
0 commit comments