Skip to content

Commit

Permalink
add a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea authored and marijnh committed Apr 24, 2021
1 parent b28eef4 commit b79056b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/tests-class-features-2022.js
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,7 @@ test("async function f() { class C { aaa = await } }", {
],
"sourceType": "script"
}, {ecmaVersion: 13})
testFail("async function f() { class C { aaa = await } }", "Cannot use keyword 'await' outside an async function (1:37)", {ecmaVersion: 13, sourceType: "module"})

// `yield` is keyword in strict mode
testFail("function* f() { class C { aaa = yield } }", "The keyword 'yield' is reserved (1:32)", {ecmaVersion: 13})
Expand Down

0 comments on commit b79056b

Please sign in to comment.