summaryrefslogtreecommitdiff
path: root/tests/specs/lockfile/adding_npm_dep
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/lockfile/adding_npm_dep')
-rw-r--r--tests/specs/lockfile/adding_npm_dep/__test__.jsonc16
-rw-r--r--tests/specs/lockfile/adding_npm_dep/add.ts1
-rw-r--r--tests/specs/lockfile/adding_npm_dep/deno.json9
-rw-r--r--tests/specs/lockfile/adding_npm_dep/lock01.out21
-rw-r--r--tests/specs/lockfile/adding_npm_dep/lock02.out26
-rw-r--r--tests/specs/lockfile/adding_npm_dep/subtract.ts1
6 files changed, 74 insertions, 0 deletions
diff --git a/tests/specs/lockfile/adding_npm_dep/__test__.jsonc b/tests/specs/lockfile/adding_npm_dep/__test__.jsonc
new file mode 100644
index 000000000..905aaf49c
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "run add.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock01.out"
+ }, {
+ "args": "run subtract.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock02.out"
+ }]
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/add.ts b/tests/specs/lockfile/adding_npm_dep/add.ts
new file mode 100644
index 000000000..c0fe70808
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/add.ts
@@ -0,0 +1 @@
+import "add";
diff --git a/tests/specs/lockfile/adding_npm_dep/deno.json b/tests/specs/lockfile/adding_npm_dep/deno.json
new file mode 100644
index 000000000..b3bfef815
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/deno.json
@@ -0,0 +1,9 @@
+{
+ "tasks": {
+ "cat": "cat"
+ },
+ "imports": {
+ "add": "npm:@denotest/add@1",
+ "subtract": "npm:@denotest/subtract@1"
+ }
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/lock01.out b/tests/specs/lockfile/adding_npm_dep/lock01.out
new file mode 100644
index 000000000..5d5567dc0
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/lock01.out
@@ -0,0 +1,21 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "npm:@denotest/add@1": "npm:@denotest/add@1.0.0"
+ },
+ "npm": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": {}
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "npm:@denotest/add@1",
+ "npm:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/lock02.out b/tests/specs/lockfile/adding_npm_dep/lock02.out
new file mode 100644
index 000000000..6042b1cb9
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/lock02.out
@@ -0,0 +1,26 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "npm:@denotest/add@1": "npm:@denotest/add@1.0.0",
+ "npm:@denotest/subtract@1": "npm:@denotest/subtract@1.0.0"
+ },
+ "npm": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": {}
+ },
+ "@denotest/subtract@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": {}
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "npm:@denotest/add@1",
+ "npm:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/subtract.ts b/tests/specs/lockfile/adding_npm_dep/subtract.ts
new file mode 100644
index 000000000..b07f2cdfd
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/subtract.ts
@@ -0,0 +1 @@
+import "subtract";