We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
swc-project
Learn more about funding links in repositories.
Report abuse
1 parent b1f0423 commit 9dd8f6fCopy full SHA for 9dd8f6f
packages/core/__tests__/issue-9520.mjs
@@ -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
14
15
+ ;
16
+ "
17
+ `);
18
+});
19
20
+it("should transform asynchronously", async () => {
21
+ const { code } = await swc.transform(`export function foo() {
22
23
24
25
26
27
28
29
30
31
32
33
34
0 commit comments