Skip to content

Commit e9e019c

Browse files
committed
Await expect
1 parent 5bbdf1b commit e9e019c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/cli/run.spec.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -647,14 +647,12 @@ Options:
647647
});
648648

649649
it("produces AST", async() => {
650-
const output = await exec({
650+
await expect(exec({
651651
args: ["--ast"],
652652
stdin: 'foo = "1"',
653653
exitCode: 0,
654654
expected: /{.*}/,
655-
});
656-
657-
expect(() => JSON.parse(output)).toMatchObject({
655+
}).then(JSON.parse)).resolves.toMatchObject({
658656
type: "grammar",
659657
rules: [{
660658
type: "rule",

0 commit comments

Comments
 (0)