diff options
Diffstat (limited to 'tests/specs/add')
7 files changed, 24 insertions, 9 deletions
diff --git a/tests/specs/add/add_with_subpath/__test__.jsonc b/tests/specs/add/add_with_subpath/__test__.jsonc index b051bd265..edd45299d 100644 --- a/tests/specs/add/add_with_subpath/__test__.jsonc +++ b/tests/specs/add/add_with_subpath/__test__.jsonc @@ -2,11 +2,11 @@ "tempDir": true, "steps": [ { - "args": "add @std/testing/bdd npm:preact/hooks", + "args": "add jsr:@std/testing/bdd npm:preact/hooks", "output": "add.out" }, { - "args": "add @std/testing/bdd@1 npm:preact/hooks@10", + "args": "add jsr:@std/testing/bdd@1 npm:preact/hooks@10", "output": "wrong_constraint_jsr.out", "exitCode": 1 }, diff --git a/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out b/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out index 2b218407d..7de7008e9 100644 --- a/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out +++ b/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out @@ -1,4 +1,4 @@ -error: Failed to parse package required: @std/testing/bdd@1 +error: Failed to parse package required: jsr:@std/testing/bdd@1 Caused by: Invalid package specifier 'jsr:@std/testing/bdd@1'. Did you mean to write 'jsr:@std/testing@1/bdd'? diff --git a/tests/specs/add/missing_npm_specifier/__test__.jsonc b/tests/specs/add/missing_npm_specifier/__test__.jsonc index 10e109c95..3e3f8df96 100644 --- a/tests/specs/add/missing_npm_specifier/__test__.jsonc +++ b/tests/specs/add/missing_npm_specifier/__test__.jsonc @@ -2,22 +2,22 @@ "tempDir": true, "steps": [ { - "args": "add ajv@latest", + "args": "add jsr:ajv@latest", "output": "error: jsr:ajv was not found, but a matching npm package exists. Did you mean `deno add npm:ajv@latest`?\n", "exitCode": 1 }, { - "args": "add ajv", + "args": "add jsr:ajv", "output": "error: jsr:ajv was not found, but a matching npm package exists. Did you mean `deno add npm:ajv`?\n", "exitCode": 1 }, { - "args": "add ajv@8.11.0", + "args": "add jsr:ajv@8.11.0", "output": "error: jsr:ajv was not found, but a matching npm package exists. Did you mean `deno add npm:ajv@8.11.0`?\n", "exitCode": 1 }, { - "args": "install ajv@latest", + "args": "install jsr:ajv@latest", "output": "error: jsr:ajv was not found, but a matching npm package exists. Did you mean `deno install npm:ajv@latest`?\n", "exitCode": 1 } diff --git a/tests/specs/add/missing_prefix/__test__.jsonc b/tests/specs/add/missing_prefix/__test__.jsonc new file mode 100644 index 000000000..1c97b7737 --- /dev/null +++ b/tests/specs/add/missing_prefix/__test__.jsonc @@ -0,0 +1,15 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "add ajv", + "output": "error: ajv is missing a prefix. Did you mean `deno add npm:ajv`?\n", + "exitCode": 1 + }, + { + "args": "add @std/testing", + "output": "error: @std/testing is missing a prefix. Did you mean `deno add jsr:@std/testing`?\n", + "exitCode": 1 + } + ] +} diff --git a/tests/specs/add/missing_prefix/deno.json b/tests/specs/add/missing_prefix/deno.json new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/specs/add/missing_prefix/deno.json diff --git a/tests/specs/add/no_root_export/__test__.jsonc b/tests/specs/add/no_root_export/__test__.jsonc index 2adfbd8de..c0fa3b7fd 100644 --- a/tests/specs/add/no_root_export/__test__.jsonc +++ b/tests/specs/add/no_root_export/__test__.jsonc @@ -2,7 +2,7 @@ "tempDir": true, "steps": [ { - "args": "add @std/testing", + "args": "add jsr:@std/testing", "output": "add.out" } ] diff --git a/tests/specs/add/package_json_and_deno_json/__test__.jsonc b/tests/specs/add/package_json_and_deno_json/__test__.jsonc index 4d886d98b..0beee02d1 100644 --- a/tests/specs/add/package_json_and_deno_json/__test__.jsonc +++ b/tests/specs/add/package_json_and_deno_json/__test__.jsonc @@ -4,7 +4,7 @@ "npm_prefers_package_json": { "steps": [ { - "args": "add npm:@denotest/esm-basic @denotest/add npm:@denotest/say-hello", + "args": "add npm:@denotest/esm-basic jsr:@denotest/add npm:@denotest/say-hello", "output": "add.out" }, { |
