mirror of
https://github.com/denoland/deno
synced 2024-08-24 18:47:06 +00:00
Add duplicate import test
This commit is contained in:
parent
fe9ca53bc2
commit
9960b1d22b
9
tests/014_duplicate_import.ts
Normal file
9
tests/014_duplicate_import.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
// with all the imports of the same module, the module should only be
|
||||
// instantiated once
|
||||
import "./subdir/auto_print_hello.ts";
|
||||
|
||||
import "./subdir/auto_print_hello.ts";
|
||||
|
||||
(async () => {
|
||||
await import("./subdir/auto_print_hello.ts");
|
||||
})();
|
1
tests/014_duplicate_import.ts.out
Normal file
1
tests/014_duplicate_import.ts.out
Normal file
|
@ -0,0 +1 @@
|
|||
hello!
|
2
tests/subdir/auto_print_hello.ts
Normal file
2
tests/subdir/auto_print_hello.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
console.log("hello!");
|
||||
export = {};
|
Loading…
Reference in a new issue