From a4ca5b59541a2a84d25b8d7380b78303e53f4220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=AF=E7=84=B6?= Date: Thu, 15 Apr 2021 14:37:04 +0800 Subject: [PATCH] fix: add ecmaversion>5 --- tests/lib/parse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lib/parse.js b/tests/lib/parse.js index 4b9896ed..576710fc 100644 --- a/tests/lib/parse.js +++ b/tests/lib/parse.js @@ -108,14 +108,14 @@ describe("parse()", () => { // https://github.com/eslint/espree/issues/470 it("Should throw on invalid `(a = 1) = t`", () => { assert.throws(() => { - espree.parse("(a = 1) = t"); + espree.parse("(a = 1) = t", { ecmaVersion: 6 }); }); }); // https://github.com/eslint/espree/issues/472 it("Should throw on invaid `async () => await 5 ** 6;`", () => { assert.throws(() => { - espree.parse("async () => await 5 ** 6;"); + espree.parse("async () => await 5 ** 6;", { ecmaVersion: 10 }); }); });