diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-06-05 15:18:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 15:18:06 -0400 |
commit | a013b9113d36cade5f184e73ebf2aad3e50ac9bf (patch) | |
tree | e0191ebd6ae0513ff6af5d32a643e144c8fb11d3 /tests | |
parent | 1b355d8a87a3ad43bf240aa66b88eb98c1cd777f (diff) |
fix: support importing statically unanalyzable npm specifiers (#24107)
Closes https://github.com/denoland/deno/issues/20479
Closes https://github.com/denoland/deno/issues/18744
Diffstat (limited to 'tests')
-rw-r--r-- | tests/specs/npm/unanalyzable_dynamic_import/__test__.jsonc | 4 | ||||
-rw-r--r-- | tests/specs/npm/unanalyzable_dynamic_import/main.out | 1 | ||||
-rw-r--r-- | tests/specs/npm/unanalyzable_dynamic_import/main.ts | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/specs/npm/unanalyzable_dynamic_import/__test__.jsonc b/tests/specs/npm/unanalyzable_dynamic_import/__test__.jsonc new file mode 100644 index 000000000..0ef147253 --- /dev/null +++ b/tests/specs/npm/unanalyzable_dynamic_import/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run -A --quiet main.ts", + "output": "main.out" +} diff --git a/tests/specs/npm/unanalyzable_dynamic_import/main.out b/tests/specs/npm/unanalyzable_dynamic_import/main.out new file mode 100644 index 000000000..00750edc0 --- /dev/null +++ b/tests/specs/npm/unanalyzable_dynamic_import/main.out @@ -0,0 +1 @@ +3 diff --git a/tests/specs/npm/unanalyzable_dynamic_import/main.ts b/tests/specs/npm/unanalyzable_dynamic_import/main.ts new file mode 100644 index 000000000..793833ee2 --- /dev/null +++ b/tests/specs/npm/unanalyzable_dynamic_import/main.ts @@ -0,0 +1,4 @@ +const specifier = "npm:@denotest/add"; +const { add } = await import(specifier); + +console.log(add(1, 2)); |