diff options
Diffstat (limited to 'tests/specs/npm/npmrc_bad_registry_config')
5 files changed, 30 insertions, 0 deletions
diff --git a/tests/specs/npm/npmrc_bad_registry_config/.npmrc b/tests/specs/npm/npmrc_bad_registry_config/.npmrc new file mode 100644 index 000000000..709720a45 --- /dev/null +++ b/tests/specs/npm/npmrc_bad_registry_config/.npmrc @@ -0,0 +1,5 @@ +@denotest:registry=http://127.0.0.1:4261/ +; This configuration is wrong - the registry URL must +; be exactly the same as registry configured for the scope, +; not root url + scope name. +//127.0.0.1:4261/denotest/:_authToken=invalid-token diff --git a/tests/specs/npm/npmrc_bad_registry_config/__test__.jsonc b/tests/specs/npm/npmrc_bad_registry_config/__test__.jsonc new file mode 100644 index 000000000..fe99247b1 --- /dev/null +++ b/tests/specs/npm/npmrc_bad_registry_config/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "envs": { + "DENO_FUTURE": "1" + }, + "tempDir": true, + "args": "install", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/npm/npmrc_bad_registry_config/main.js b/tests/specs/npm/npmrc_bad_registry_config/main.js new file mode 100644 index 000000000..e8ccf7611 --- /dev/null +++ b/tests/specs/npm/npmrc_bad_registry_config/main.js @@ -0,0 +1,5 @@ +import { getValue, setValue } from "@denotest/basic"; + +console.log(getValue()); +setValue(42); +console.log(getValue()); diff --git a/tests/specs/npm/npmrc_bad_registry_config/main.out b/tests/specs/npm/npmrc_bad_registry_config/main.out new file mode 100644 index 000000000..ceee1fed4 --- /dev/null +++ b/tests/specs/npm/npmrc_bad_registry_config/main.out @@ -0,0 +1,4 @@ +⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag. +Download http://127.0.0.1:4261/@denotest/basic +error: Error getting response at http://127.0.0.1:4261/@denotest/basic for package "@denotest/basic": Bad response: 401 +[WILDCARD]
\ No newline at end of file diff --git a/tests/specs/npm/npmrc_bad_registry_config/package.json b/tests/specs/npm/npmrc_bad_registry_config/package.json new file mode 100644 index 000000000..b5ca7df42 --- /dev/null +++ b/tests/specs/npm/npmrc_bad_registry_config/package.json @@ -0,0 +1,7 @@ +{ + "name": "npmrc_test", + "version": "0.0.1", + "dependencies": { + "@denotest/basic": "1.0.0" + } +} |