summaryrefslogtreecommitdiff
path: root/tests/014_duplicate_import.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-08-27 19:32:12 -0700
committerRyan Dahl <ry@tinyclouds.org>2018-08-28 08:44:34 -0400
commit9960b1d22b474d87d03855e2aefd8c552ce02e58 (patch)
tree25d97b4697b48233f6aff5152918def4054c3d1b /tests/014_duplicate_import.ts
parentfe9ca53bc2037c25e41a13f19e1afacda8ed3c08 (diff)
Add duplicate import test
Diffstat (limited to 'tests/014_duplicate_import.ts')
-rw-r--r--tests/014_duplicate_import.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/014_duplicate_import.ts b/tests/014_duplicate_import.ts
new file mode 100644
index 000000000..88f934526
--- /dev/null
+++ b/tests/014_duplicate_import.ts
@@ -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");
+})();