summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-08 23:16:44 -0400
committerGitHub <noreply@github.com>2024-05-09 03:16:44 +0000
commit263b6b971db60135e655914e7e33b8c26290a421 (patch)
tree50cc9b1f17b3511cdb19de8bfbaddd0607422b09 /tests/specs
parent47f7bed677a6b72e873712de8f3988ea891710e4 (diff)
fix(task): regression where `npx <command>` sometimes couldn't find command (#23730)
Closes https://github.com/denoland/deno/issues/23724
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/task/npx_installed_pkg_non_byonm/__test__.jsonc11
-rw-r--r--tests/specs/task/npx_installed_pkg_non_byonm/deno.jsonc7
-rw-r--r--tests/specs/task/npx_installed_pkg_non_byonm/main.out9
-rw-r--r--tests/specs/task/npx_installed_pkg_non_byonm/package.json5
4 files changed, 32 insertions, 0 deletions
diff --git a/tests/specs/task/npx_installed_pkg_non_byonm/__test__.jsonc b/tests/specs/task/npx_installed_pkg_non_byonm/__test__.jsonc
new file mode 100644
index 000000000..ae9e640e6
--- /dev/null
+++ b/tests/specs/task/npx_installed_pkg_non_byonm/__test__.jsonc
@@ -0,0 +1,11 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "commandName": "npm",
+ "args": "install",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task say",
+ "output": "main.out"
+ }]
+}
diff --git a/tests/specs/task/npx_installed_pkg_non_byonm/deno.jsonc b/tests/specs/task/npx_installed_pkg_non_byonm/deno.jsonc
new file mode 100644
index 000000000..00303820b
--- /dev/null
+++ b/tests/specs/task/npx_installed_pkg_non_byonm/deno.jsonc
@@ -0,0 +1,7 @@
+{
+ // not byonm
+ "nodeModulesDir": true,
+ "tasks": {
+ "say": "npx cowsay moo"
+ }
+}
diff --git a/tests/specs/task/npx_installed_pkg_non_byonm/main.out b/tests/specs/task/npx_installed_pkg_non_byonm/main.out
new file mode 100644
index 000000000..db58009ce
--- /dev/null
+++ b/tests/specs/task/npx_installed_pkg_non_byonm/main.out
@@ -0,0 +1,9 @@
+Task say npx cowsay moo
+ _____
+< moo >
+ -----
+ \ ^__^
+ \ (oo)\_______
+ (__)\ )\/\
+ ||----w |
+ || ||
diff --git a/tests/specs/task/npx_installed_pkg_non_byonm/package.json b/tests/specs/task/npx_installed_pkg_non_byonm/package.json
new file mode 100644
index 000000000..7a519e140
--- /dev/null
+++ b/tests/specs/task/npx_installed_pkg_non_byonm/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "cowsay": "*"
+ }
+}