mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
Add duplicate import test
This commit is contained in:
parent
fe9ca53bc2
commit
9960b1d22b
3 changed files with 12 additions and 0 deletions
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