Skip to content

Commit

Permalink
Avoid optional chaining in test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed May 7, 2024
1 parent f0e5436 commit 6116a8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/babel-parser/test/misc.js
Expand Up @@ -4,7 +4,9 @@ describe("misc", () => {
describe("Program.extra.async", () => {
it("not set for scripts", () => {
const ast = parse("function f() {}", { sourceType: "script" });
expect(ast.program.extra?.topLevelAwait).toBeUndefined();
expect(
ast.program.extra && ast.program.extra.topLevelAwait,
).toBeUndefined();
});

test.each([
Expand Down

0 comments on commit 6116a8d

Please sign in to comment.