From 7b893bd57f2f013c4a11e1e9f0ba435a3cfc96c0 Mon Sep 17 00:00:00 2001 From: William Tetlow <9057181+williamtetlow@users.noreply.github.com> Date: Tue, 15 Feb 2022 12:33:46 +0000 Subject: feat(cli): Replace bundling with eszip in deno compile (#13563) Co-authored-by: Divy Srivastava --- cli/tests/testdata/standalone_dynamic_imports.ts | 15 +++++++++++++++ .../testdata/standalone_error_module_with_imports_1.ts | 1 + .../testdata/standalone_error_module_with_imports_2.ts | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 cli/tests/testdata/standalone_dynamic_imports.ts create mode 100644 cli/tests/testdata/standalone_error_module_with_imports_1.ts create mode 100644 cli/tests/testdata/standalone_error_module_with_imports_2.ts (limited to 'cli/tests/testdata') 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!"); -- cgit v1.2.3