Skip to content

Commit 0ef84e1

Browse files
authoredJan 11, 2023
test(es/module): Add a test for invalid issue (#6785)
**Related issue:** - Closes #6779.
1 parent cd06479 commit 0ef84e1

File tree

8 files changed

+26
-0
lines changed

8 files changed

+26
-0
lines changed
 

‎crates/swc_ecma_transforms_module/tests/paths/issue-6779/1/input/add.ts

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
async function main() {
2+
const addFunction = (await import('@/utils/add')).default // This doesn't work
3+
4+
console.log('2 + 3 =', addFunction(2, 3))
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"@/utils/*": ["./*"]
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
async function main() {
2+
const addFunction = (await import("./add")).default // This doesn't work
3+
;
4+
console.log('2 + 3 =', addFunction(2, 3));
5+
}

‎crates/swc_ecma_transforms_module/tests/paths/issue-6779/2/input/add.ts

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import addFunction from '@/utils/add'
2+
3+
4+
async function main() {
5+
console.log('2 + 3 =', addFunction(2, 3))
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"@/utils/*": ["./*"]
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import addFunction from "./add";
2+
async function main() {
3+
console.log('2 + 3 =', addFunction(2, 3));
4+
}

0 commit comments

Comments
 (0)
Please sign in to comment.