summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/install/future_install_node_modules/__test__.jsonc38
-rw-r--r--tests/specs/install/future_install_node_modules/install_lockfile.out2
-rw-r--r--tests/specs/npm/npmrc_not_next_to_package_json/main.out1
3 files changed, 41 insertions, 0 deletions
diff --git a/tests/specs/install/future_install_node_modules/__test__.jsonc b/tests/specs/install/future_install_node_modules/__test__.jsonc
index 571216557..c705ad0f8 100644
--- a/tests/specs/install/future_install_node_modules/__test__.jsonc
+++ b/tests/specs/install/future_install_node_modules/__test__.jsonc
@@ -25,6 +25,44 @@
}
]
},
+ "install_sets_up_node_modules_with_lockfile": {
+ "tempDir": true,
+ "envs": {
+ "DENO_FUTURE": "1"
+ },
+ "steps": [
+ {
+ "args": "install",
+ "output": "install.out"
+ },
+ {
+ // check for lockfile
+ "args": [
+ "eval",
+ "console.log(Deno.readTextFileSync('./deno.lock').trim())"
+ ],
+ "output": "deno.lock.out"
+ },
+ {
+ // remove the lockfile
+ "args": [
+ "eval",
+ "Deno.removeSync('node_modules', {recursive: true});"
+ ],
+ "output": ""
+ },
+ {
+ // install, this time should use the lockfile
+ "args": "install",
+ "output": "install_lockfile.out"
+ },
+ {
+ // make sure we created the node_modules dir
+ "args": ["eval", "Deno.statSync('node_modules')"],
+ "output": ""
+ }
+ ]
+ },
"install_errors_corrupted_lockfile": {
"tempDir": true,
"envs": {
diff --git a/tests/specs/install/future_install_node_modules/install_lockfile.out b/tests/specs/install/future_install_node_modules/install_lockfile.out
new file mode 100644
index 000000000..3e27e3d20
--- /dev/null
+++ b/tests/specs/install/future_install_node_modules/install_lockfile.out
@@ -0,0 +1,2 @@
+⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag.
+Initialize @denotest/esm-basic@1.0.0
diff --git a/tests/specs/npm/npmrc_not_next_to_package_json/main.out b/tests/specs/npm/npmrc_not_next_to_package_json/main.out
index 8f42fb6d8..933d44f1c 100644
--- a/tests/specs/npm/npmrc_not_next_to_package_json/main.out
+++ b/tests/specs/npm/npmrc_not_next_to_package_json/main.out
@@ -4,3 +4,4 @@
[WILDCARD]
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
Initialize @denotest/esm-basic@1.0.0
+[WILDCARD]