summaryrefslogtreecommitdiff
path: root/cli/tests/013_dynamic_import.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/013_dynamic_import.ts')
-rw-r--r--cli/tests/013_dynamic_import.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/013_dynamic_import.ts b/cli/tests/013_dynamic_import.ts
new file mode 100644
index 000000000..6bbce3132
--- /dev/null
+++ b/cli/tests/013_dynamic_import.ts
@@ -0,0 +1,15 @@
+(async (): Promise<void> => {
+ const { returnsHi, returnsFoo2, printHello3 } = await import(
+ "./subdir/mod1.ts"
+ );
+
+ printHello3();
+
+ if (returnsHi() !== "Hi") {
+ throw Error("Unexpected");
+ }
+
+ if (returnsFoo2() !== "Foo") {
+ throw Error("Unexpected");
+ }
+})();