Skip to content

Commit 9dd8f6f

Browse files
authoredSep 14, 2024··
test(es): Add tests for arm64 windows (#9547)
1 parent b1f0423 commit 9dd8f6f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
 
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import swc from "..";
2+
3+
it("should transform synchronously", () => {
4+
const { code } = swc.transformSync(`export function foo() {
5+
if (false) {
6+
}
7+
return 'foo';
8+
};`);
9+
10+
expect(code).toMatchInlineSnapshot(`
11+
"export function foo() {
12+
if (false) {}
13+
return 'foo';
14+
}
15+
;
16+
"
17+
`);
18+
});
19+
20+
it("should transform asynchronously", async () => {
21+
const { code } = await swc.transform(`export function foo() {
22+
if (false) {
23+
}
24+
return 'foo';
25+
};`);
26+
expect(code).toMatchInlineSnapshot(`
27+
"export function foo() {
28+
if (false) {}
29+
return 'foo';
30+
}
31+
;
32+
"
33+
`);
34+
});

0 commit comments

Comments
 (0)
Please sign in to comment.