diff options
Diffstat (limited to 'cli/tests/testdata')
3 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/testdata/standalone_dynamic_imports.ts b/cli/tests/testdata/standalone_dynamic_imports.ts new file mode 100644 index 000000000..d4dc55152 --- /dev/null +++ b/cli/tests/testdata/standalone_dynamic_imports.ts @@ -0,0 +1,15 @@ +(async () => { + const { returnsHi, returnsFoo2, printHello3 } = await import( + "./subdir/mod1.ts" + ); + + printHello3(); + + if (returnsHi() !== "Hi") { + throw Error("Unexpected"); + } + + if (returnsFoo2() !== "Foo") { + throw Error("Unexpected"); + } +})(); diff --git a/cli/tests/testdata/standalone_error_module_with_imports_1.ts b/cli/tests/testdata/standalone_error_module_with_imports_1.ts new file mode 100644 index 000000000..bf38f7263 --- /dev/null +++ b/cli/tests/testdata/standalone_error_module_with_imports_1.ts @@ -0,0 +1 @@ +import "./standalone_error_module_with_imports_2.ts"; diff --git a/cli/tests/testdata/standalone_error_module_with_imports_2.ts b/cli/tests/testdata/standalone_error_module_with_imports_2.ts new file mode 100644 index 000000000..ef052b512 --- /dev/null +++ b/cli/tests/testdata/standalone_error_module_with_imports_2.ts @@ -0,0 +1,2 @@ +console.log("hello"); +throw new Error("boom!"); |
