Skip to content

Commit

Permalink
test(es): Add tests for arm64 windows (#9547)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Sep 14, 2024
1 parent b1f0423 commit 9dd8f6f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions packages/core/__tests__/issue-9520.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import swc from "..";

it("should transform synchronously", () => {
const { code } = swc.transformSync(`export function foo() {
if (false) {
}
return 'foo';
};`);

expect(code).toMatchInlineSnapshot(`
"export function foo() {
if (false) {}
return 'foo';
}
;
"
`);
});

it("should transform asynchronously", async () => {
const { code } = await swc.transform(`export function foo() {
if (false) {
}
return 'foo';
};`);
expect(code).toMatchInlineSnapshot(`
"export function foo() {
if (false) {}
return 'foo';
}
;
"
`);
});

0 comments on commit 9dd8f6f

Please sign in to comment.