summaryrefslogtreecommitdiff
path: root/tests/specs/add
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-08-21 15:23:32 -0700
committerGitHub <noreply@github.com>2024-08-21 15:23:32 -0700
commit48da3c17ea905f50b82948e6f94795e1589f852e (patch)
treee65d5da97ef0cd4b9f67972b8ba647420d39952e /tests/specs/add
parent9aaad3064a412b24e88e308750e038d4e1df6f3c (diff)
fix(add): Handle packages without root exports (#25102)
Fixes #24607. This PR makes the logic that caches top level dependencies (things present in import map) smarter, so we handle JSR dependencies without root exports.
Diffstat (limited to 'tests/specs/add')
-rw-r--r--tests/specs/add/no_root_export/__test__.jsonc9
-rw-r--r--tests/specs/add/no_root_export/add.out5
-rw-r--r--tests/specs/add/no_root_export/deno.json0
-rw-r--r--tests/specs/add/no_root_export/main.ts3
4 files changed, 17 insertions, 0 deletions
diff --git a/tests/specs/add/no_root_export/__test__.jsonc b/tests/specs/add/no_root_export/__test__.jsonc
new file mode 100644
index 000000000..2adfbd8de
--- /dev/null
+++ b/tests/specs/add/no_root_export/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "tempDir": true,
+ "steps": [
+ {
+ "args": "add @std/testing",
+ "output": "add.out"
+ }
+ ]
+}
diff --git a/tests/specs/add/no_root_export/add.out b/tests/specs/add/no_root_export/add.out
new file mode 100644
index 000000000..4bd9da7be
--- /dev/null
+++ b/tests/specs/add/no_root_export/add.out
@@ -0,0 +1,5 @@
+Add jsr:@std/testing@1.0.0
+[UNORDERED_START]
+Download http://127.0.0.1:4250/@std/testing/1.0.0/bdd.ts
+Download http://127.0.0.1:4250/@std/testing/1.0.0/types.ts
+[UNORDERED_END]
diff --git a/tests/specs/add/no_root_export/deno.json b/tests/specs/add/no_root_export/deno.json
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/add/no_root_export/deno.json
diff --git a/tests/specs/add/no_root_export/main.ts b/tests/specs/add/no_root_export/main.ts
new file mode 100644
index 000000000..0c0d4107f
--- /dev/null
+++ b/tests/specs/add/no_root_export/main.ts
@@ -0,0 +1,3 @@
+import { it } from "@std/testing/bdd";
+
+const _it = it;