summaryrefslogtreecommitdiff
path: root/tests/specs/npm/lifecycle_scripts/__test__.jsonc
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-07-15 12:11:09 -0700
committerGitHub <noreply@github.com>2024-07-15 12:11:09 -0700
commit04f9db5b2217fe06f88e76146aac6362ff0b0b86 (patch)
treeaa4becb2529141de3e6bb8d3ba430f3c7e036902 /tests/specs/npm/lifecycle_scripts/__test__.jsonc
parent29186d7e5963f2398b28ee2c043b27e4881075ef (diff)
fix(node): Fix `--allow-scripts` with no `deno.json` (#24533)
We would resolve the wrong package.json, resulting in an inability to run CJS (or other node-mode) scripts
Diffstat (limited to 'tests/specs/npm/lifecycle_scripts/__test__.jsonc')
-rw-r--r--tests/specs/npm/lifecycle_scripts/__test__.jsonc13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/specs/npm/lifecycle_scripts/__test__.jsonc b/tests/specs/npm/lifecycle_scripts/__test__.jsonc
index 5639c83cd..b862b8126 100644
--- a/tests/specs/npm/lifecycle_scripts/__test__.jsonc
+++ b/tests/specs/npm/lifecycle_scripts/__test__.jsonc
@@ -119,6 +119,19 @@
"output": ""
}
]
+ },
+ "lifecycle_scripts_no_deno_json": {
+ "tempDir": true,
+ "steps": [
+ {
+ "args": ["eval", "Deno.removeSync('deno.json')"],
+ "output": ""
+ },
+ {
+ "args": "cache --allow-scripts --node-modules-dir=true no_deno_json.js",
+ "output": "no_deno_json.out"
+ }
+ ]
}
}
}