diff options
Diffstat (limited to 'tests/specs/install/no_future_install_global')
5 files changed, 38 insertions, 0 deletions
diff --git a/tests/specs/install/no_future_install_global/__test__.jsonc b/tests/specs/install/no_future_install_global/__test__.jsonc new file mode 100644 index 000000000..ca351ee0d --- /dev/null +++ b/tests/specs/install/no_future_install_global/__test__.jsonc @@ -0,0 +1,13 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install --root ./bins --name deno-test-bin ./main.js", + "output": "install.out" + }, + { + "args": "run -A ./assert.js", + "output": "" + } + ] +} diff --git a/tests/specs/install/no_future_install_global/assert.js b/tests/specs/install/no_future_install_global/assert.js new file mode 100644 index 000000000..c7a6a0680 --- /dev/null +++ b/tests/specs/install/no_future_install_global/assert.js @@ -0,0 +1,11 @@ +const dirs = Deno.readDir("./bins/bin"); + +let found = false; +for await (const entry of dirs) { + if (entry.name.includes("deno-test-bin")) { + found = true; + } +} +if (!found) { + throw new Error("Failed to find test bin"); +} diff --git a/tests/specs/install/no_future_install_global/install.out b/tests/specs/install/no_future_install_global/install.out new file mode 100644 index 000000000..f3a394c6f --- /dev/null +++ b/tests/specs/install/no_future_install_global/install.out @@ -0,0 +1,5 @@ +⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag. +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +✅ Successfully installed deno-test-bin[WILDCARD] +[WILDCARD] diff --git a/tests/specs/install/no_future_install_global/main.js b/tests/specs/install/no_future_install_global/main.js new file mode 100644 index 000000000..6268d7136 --- /dev/null +++ b/tests/specs/install/no_future_install_global/main.js @@ -0,0 +1,3 @@ +import { setValue } from "npm:@denotest/esm-basic"; + +setValue(5); diff --git a/tests/specs/install/no_future_install_global/package.json b/tests/specs/install/no_future_install_global/package.json new file mode 100644 index 000000000..9f465ad50 --- /dev/null +++ b/tests/specs/install/no_future_install_global/package.json @@ -0,0 +1,6 @@ +{ + "name": "deno-test-bin", + "dependencies": { + "@denotest/esm-basic": "*" + } +} |
