Skip to content

Commit

Permalink
Add test to cover missing case
Browse files Browse the repository at this point in the history
  • Loading branch information
alangpierce committed Mar 20, 2023
1 parent cb1a5fd commit b06d6ac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/sucrase-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1752,4 +1752,18 @@ describe("sucrase", () => {
{transforms: []},
);
});

it("correctly parses for-of loops with external loop variable", () => {
assertResult(
`
let a;
for (a of b) {}
`,
`
let a;
for (a of b) {}
`,
{transforms: []},
);
});
});

0 comments on commit b06d6ac

Please sign in to comment.