summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/specs/add/dist_tag/__test__.jsonc2
-rw-r--r--tests/specs/add/dist_tag/add.out15
-rw-r--r--tests/specs/remove/basic/__test__.jsonc16
-rw-r--r--tests/specs/remove/basic/add.out12
-rw-r--r--tests/specs/remove/basic/add_lock.out24
-rw-r--r--tests/specs/remove/basic/remove_lock.out4
-rw-r--r--tests/specs/remove/basic/rm.out2
7 files changed, 74 insertions, 1 deletions
diff --git a/tests/specs/add/dist_tag/__test__.jsonc b/tests/specs/add/dist_tag/__test__.jsonc
index ac8a65654..93104966d 100644
--- a/tests/specs/add/dist_tag/__test__.jsonc
+++ b/tests/specs/add/dist_tag/__test__.jsonc
@@ -3,7 +3,7 @@
"steps": [
{
"args": "add npm:ajv@latest",
- "output": "Add npm:ajv@8.11.0\n"
+ "output": "add.out"
}
]
}
diff --git a/tests/specs/add/dist_tag/add.out b/tests/specs/add/dist_tag/add.out
new file mode 100644
index 000000000..928eb6d6c
--- /dev/null
+++ b/tests/specs/add/dist_tag/add.out
@@ -0,0 +1,15 @@
+Add npm:ajv@8.11.0
+[UNORDERED_START]
+Download http://localhost:4260/ajv
+Download http://localhost:4260/fast-deep-equal
+Download http://localhost:4260/json-schema-traverse
+Download http://localhost:4260/require-from-string
+Download http://localhost:4260/uri-js
+Download http://localhost:4260/punycode
+Download http://localhost:4260/ajv/ajv-8.11.0.tgz
+Download http://localhost:4260/require-from-string/require-from-string-2.0.2.tgz
+Download http://localhost:4260/uri-js/uri-js-4.4.1.tgz
+Download http://localhost:4260/fast-deep-equal/fast-deep-equal-3.1.3.tgz
+Download http://localhost:4260/json-schema-traverse/json-schema-traverse-1.0.0.tgz
+Download http://localhost:4260/punycode/punycode-2.1.1.tgz
+[UNORDERED_END]
diff --git a/tests/specs/remove/basic/__test__.jsonc b/tests/specs/remove/basic/__test__.jsonc
new file mode 100644
index 000000000..2f4d82c88
--- /dev/null
+++ b/tests/specs/remove/basic/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": ["add", "@std/assert", "@std/http"],
+ "output": "add.out"
+ }, {
+ "args": ["eval", "console.log(Deno.readTextFileSync('deno.lock').trim())"],
+ "output": "add_lock.out"
+ }, {
+ "args": ["remove", "@std/assert", "@std/http"],
+ "output": "rm.out"
+ }, {
+ "args": ["eval", "console.log(Deno.readTextFileSync('deno.lock').trim())"],
+ "output": "remove_lock.out"
+ }]
+}
diff --git a/tests/specs/remove/basic/add.out b/tests/specs/remove/basic/add.out
new file mode 100644
index 000000000..a93b0ab52
--- /dev/null
+++ b/tests/specs/remove/basic/add.out
@@ -0,0 +1,12 @@
+Created deno.json configuration file.
+Add jsr:@std/assert@1.0.0
+Add jsr:@std/http@1.0.0
+[UNORDERED_START]
+Download http://127.0.0.1:4250/@std/http/1.0.0_meta.json
+Download http://127.0.0.1:4250/@std/assert/1.0.0_meta.json
+Download http://127.0.0.1:4250/@std/http/1.0.0/mod.ts
+Download http://127.0.0.1:4250/@std/assert/1.0.0/mod.ts
+Download http://127.0.0.1:4250/@std/assert/1.0.0/assert_equals.ts
+Download http://127.0.0.1:4250/@std/assert/1.0.0/assert.ts
+Download http://127.0.0.1:4250/@std/assert/1.0.0/fail.ts
+[UNORDERED_END]
diff --git a/tests/specs/remove/basic/add_lock.out b/tests/specs/remove/basic/add_lock.out
new file mode 100644
index 000000000..a5a45e854
--- /dev/null
+++ b/tests/specs/remove/basic/add_lock.out
@@ -0,0 +1,24 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "jsr:@std/assert@^1.0.0": "jsr:@std/assert@1.0.0",
+ "jsr:@std/http@^1.0.0": "jsr:@std/http@1.0.0"
+ },
+ "jsr": {
+ "@std/assert@1.0.0": {
+ "integrity": "7ae268c58de9693b4997fd93d9b303a47df336664e2008378ccb93c3458d092a"
+ },
+ "@std/http@1.0.0": {
+ "integrity": "d75bd303c21123a9b58f7249e38b4c0aa3a09f7d76b13f9d7e7842d89052091a"
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "jsr:@std/assert@^1.0.0",
+ "jsr:@std/http@^1.0.0"
+ ]
+ }
+}
diff --git a/tests/specs/remove/basic/remove_lock.out b/tests/specs/remove/basic/remove_lock.out
new file mode 100644
index 000000000..37f10ce95
--- /dev/null
+++ b/tests/specs/remove/basic/remove_lock.out
@@ -0,0 +1,4 @@
+{
+ "version": "3",
+ "remote": {}
+}
diff --git a/tests/specs/remove/basic/rm.out b/tests/specs/remove/basic/rm.out
new file mode 100644
index 000000000..083ab8c05
--- /dev/null
+++ b/tests/specs/remove/basic/rm.out
@@ -0,0 +1,2 @@
+Removed @std/assert
+Removed @std/http