summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/add/add_with_subpath/__test__.jsonc19
-rw-r--r--tests/specs/add/add_with_subpath/add.out8
-rw-r--r--tests/specs/add/add_with_subpath/deno.json0
-rw-r--r--tests/specs/add/add_with_subpath/wrong_constraint_jsr.out4
-rw-r--r--tests/specs/add/add_with_subpath/wrong_constraint_npm.out4
5 files changed, 35 insertions, 0 deletions
diff --git a/tests/specs/add/add_with_subpath/__test__.jsonc b/tests/specs/add/add_with_subpath/__test__.jsonc
new file mode 100644
index 000000000..b051bd265
--- /dev/null
+++ b/tests/specs/add/add_with_subpath/__test__.jsonc
@@ -0,0 +1,19 @@
+{
+ "tempDir": true,
+ "steps": [
+ {
+ "args": "add @std/testing/bdd npm:preact/hooks",
+ "output": "add.out"
+ },
+ {
+ "args": "add @std/testing/bdd@1 npm:preact/hooks@10",
+ "output": "wrong_constraint_jsr.out",
+ "exitCode": 1
+ },
+ {
+ "args": "add npm:preact/hooks@10",
+ "output": "wrong_constraint_npm.out",
+ "exitCode": 1
+ }
+ ]
+}
diff --git a/tests/specs/add/add_with_subpath/add.out b/tests/specs/add/add_with_subpath/add.out
new file mode 100644
index 000000000..02b286ba3
--- /dev/null
+++ b/tests/specs/add/add_with_subpath/add.out
@@ -0,0 +1,8 @@
+[UNORDERED_START]
+Add jsr:@std/testing@1.0.0
+Add npm:preact@10.19.6
+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
+Download http://localhost:4260/preact
+Download http://localhost:4260/preact/preact-10.19.6.tgz
+[UNORDERED_END]
diff --git a/tests/specs/add/add_with_subpath/deno.json b/tests/specs/add/add_with_subpath/deno.json
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/add/add_with_subpath/deno.json
diff --git a/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out b/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out
new file mode 100644
index 000000000..2b218407d
--- /dev/null
+++ b/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out
@@ -0,0 +1,4 @@
+error: Failed to parse package required: @std/testing/bdd@1
+
+Caused by:
+ Invalid package specifier 'jsr:@std/testing/bdd@1'. Did you mean to write 'jsr:@std/testing@1/bdd'?
diff --git a/tests/specs/add/add_with_subpath/wrong_constraint_npm.out b/tests/specs/add/add_with_subpath/wrong_constraint_npm.out
new file mode 100644
index 000000000..4adcf9ef6
--- /dev/null
+++ b/tests/specs/add/add_with_subpath/wrong_constraint_npm.out
@@ -0,0 +1,4 @@
+error: Failed to parse package required: npm:preact/hooks@10
+
+Caused by:
+ Invalid package specifier 'npm:preact/hooks@10'. Did you mean to write 'npm:preact@10/hooks'?