diff --git a/package.json b/package.json index 722fa84c..9ce2cada 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.1.0", + "acorn": "^8.2.2", "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^2.0.0" }, diff --git a/tests/lib/parse.js b/tests/lib/parse.js index 70faa587..79526d7b 100644 --- a/tests/lib/parse.js +++ b/tests/lib/parse.js @@ -211,6 +211,13 @@ describe("parse()", () => { espree.parse("(a = 1) = t", { ecmaVersion: 6 }); }); }); + + // https://github.com/eslint/espree/issues/472 + it("Should throw on invalid `async () => await 5 ** 6;`", () => { + assert.throws(() => { + espree.parse("async () => await 5 ** 6;", { ecmaVersion: 10 }); + }); + }); }); describe("nodes", () => {