summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-08-29 15:57:43 -0700
committerGitHub <noreply@github.com>2024-08-29 15:57:43 -0700
commit86d5b919d8ef55070e95230c9268f69cf58c25c8 (patch)
tree7d005a7116ecb44fc95e64489eac66f786d2ef11 /tests
parent0fb8df6c0ce582c947a8e165c7fb31cd4ec0c3ca (diff)
feat(config): Node modules option for 2.0 (#25299)
Diffstat (limited to 'tests')
-rw-r--r--tests/specs/lockfile/frozen_lockfile/__test__.jsonc22
-rw-r--r--tests/specs/npm/bin_entries_prefer_closer/deno.json2
-rw-r--r--tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc4
-rw-r--r--tests/specs/npm/lifecycle_scripts/__test__.jsonc7
4 files changed, 20 insertions, 15 deletions
diff --git a/tests/specs/lockfile/frozen_lockfile/__test__.jsonc b/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
index 3036c8db5..0ac69c6bd 100644
--- a/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
+++ b/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
@@ -58,18 +58,22 @@
]
},
"error_when_package_json_changed": {
+ "envs": {
+ "DENO_FUTURE": "1"
+ },
"steps": [
{
- "envs": {
- "DENO_FUTURE": "1"
- },
+ "args": [
+ "eval",
+ "Deno.writeTextFileSync('deno.json', `{ \"nodeModules\": \"local-auto\" }`)"
+ ],
+ "output": "[WILDCARD]"
+ },
+ {
"args": "cache add.ts",
"output": "[WILDCARD]"
},
{
- "envs": {
- "DENO_FUTURE": "1"
- },
"args": [
"eval",
"Deno.writeTextFileSync(\"package.json\", JSON.stringify({ dependencies: { \"@denotest/bin\": \"0.7.0\" } }))"
@@ -77,17 +81,11 @@
"output": ""
},
{
- "envs": {
- "DENO_FUTURE": "1"
- },
"args": "cache --frozen add.ts",
"output": "frozen_package_json_changed.out",
"exitCode": 1
},
{
- "envs": {
- "DENO_FUTURE": "1"
- },
"args": "install --frozen",
"output": "frozen_package_json_changed_install.out",
"exitCode": 1
diff --git a/tests/specs/npm/bin_entries_prefer_closer/deno.json b/tests/specs/npm/bin_entries_prefer_closer/deno.json
index 176354f98..b2edaa035 100644
--- a/tests/specs/npm/bin_entries_prefer_closer/deno.json
+++ b/tests/specs/npm/bin_entries_prefer_closer/deno.json
@@ -1,3 +1,3 @@
{
- "nodeModulesDir": true
+ "nodeModules": "local-auto"
}
diff --git a/tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc b/tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc
index b7c3b90d7..bc39e85da 100644
--- a/tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc
+++ b/tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc
@@ -10,11 +10,11 @@
"exitCode": 1
}, {
// this should override byonm
- "args": "run --node-modules-dir=false --quiet main.ts",
+ "args": "run --node-modules=global-auto --quiet main.ts",
"output": "main.out"
}, {
// same with this
- "args": "run --node-modules-dir --quiet main.ts",
+ "args": "run --node-modules=local-auto --quiet main.ts",
"output": "main.out"
}]
}
diff --git a/tests/specs/npm/lifecycle_scripts/__test__.jsonc b/tests/specs/npm/lifecycle_scripts/__test__.jsonc
index 302b40d1e..c62bc47b4 100644
--- a/tests/specs/npm/lifecycle_scripts/__test__.jsonc
+++ b/tests/specs/npm/lifecycle_scripts/__test__.jsonc
@@ -81,6 +81,13 @@
{
"args": [
"eval",
+ "Deno.removeSync('./deno.json')"
+ ],
+ "output": "[WILDCARD]"
+ },
+ {
+ "args": [
+ "eval",
"Deno.writeTextFileSync('package.json', '{\"dependencies\":{ \"@denotest/node-lifecycle-scripts\": \"*\" } }')"
],
"output": ""