summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-02-06 21:06:34 -0500
committerGitHub <noreply@github.com>2024-02-07 02:06:34 +0000
commit227ec14e6ca596bb4ddcb2ee2ec82311f0ac87e5 (patch)
tree5d932e90505ab2879b6eea10cbdbdc63857fed7e
parent043fee48fd72fbce2357e93431753db5b086cffd (diff)
chore: use same test server for jsr tests (#22303)
We had two test servers.
-rw-r--r--cli/tests/integration/publish_tests.rs34
-rw-r--r--cli/tests/integration/run_tests.rs12
-rw-r--r--cli/tests/testdata/jsr/deps/main.out20
-rw-r--r--cli/tests/testdata/jsr/deps/main_info.out28
-rw-r--r--cli/tests/testdata/jsr/module_graph/main.out8
-rw-r--r--cli/tests/testdata/jsr/module_graph/main_info.out12
-rw-r--r--cli/tests/testdata/jsr/no_module_graph/main.out8
-rw-r--r--cli/tests/testdata/jsr/no_module_graph/main_info.out12
-rw-r--r--cli/tests/testdata/jsr/subset_type_graph/main.check.out18
-rw-r--r--cli/tests/testdata/jsr/version_not_found/main.out2
-rw-r--r--cli/tests/testdata/publish/no_zap.out5
-rw-r--r--test_util/src/builders.rs4
-rw-r--r--test_util/src/lib.rs7
13 files changed, 87 insertions, 83 deletions
diff --git a/cli/tests/integration/publish_tests.rs b/cli/tests/integration/publish_tests.rs
index 28c57e010..330a7692b 100644
--- a/cli/tests/integration/publish_tests.rs
+++ b/cli/tests/integration/publish_tests.rs
@@ -3,18 +3,10 @@
use deno_core::serde_json::json;
use test_util::assert_contains;
use test_util::assert_not_contains;
+use test_util::env_vars_for_jsr_tests;
use test_util::env_vars_for_npm_tests;
use test_util::TestContextBuilder;
-static TEST_REGISTRY_URL: &str = "http://127.0.0.1:4250";
-
-pub fn env_vars_for_registry() -> Vec<(String, String)> {
- vec![(
- "DENO_REGISTRY_URL".to_string(),
- TEST_REGISTRY_URL.to_string(),
- )]
-}
-
itest!(no_token {
args: "publish",
cwd: Some("publish/missing_deno_json"),
@@ -40,7 +32,9 @@ itest!(no_zap {
args: "publish --no-zap --token 'sadfasdf'",
output: "publish/no_zap.out",
cwd: Some("publish/invalid_fast_check"),
- exit_code: 1,
+ envs: env_vars_for_jsr_tests(),
+ http_server: true,
+ exit_code: 0,
});
itest!(invalid_path {
@@ -127,7 +121,7 @@ itest!(javascript_missing_decl_file {
args: "publish --token 'sadfasdf'",
output: "publish/javascript_missing_decl_file.out",
cwd: Some("publish/javascript_missing_decl_file"),
- envs: env_vars_for_registry(),
+ envs: env_vars_for_jsr_tests(),
exit_code: 0,
http_server: true,
});
@@ -136,7 +130,7 @@ itest!(unanalyzable_dynamic_import {
args: "publish --token 'sadfasdf'",
output: "publish/unanalyzable_dynamic_import.out",
cwd: Some("publish/unanalyzable_dynamic_import"),
- envs: env_vars_for_registry(),
+ envs: env_vars_for_jsr_tests(),
exit_code: 0,
http_server: true,
});
@@ -145,7 +139,7 @@ itest!(javascript_decl_file {
args: "publish --token 'sadfasdf'",
output: "publish/javascript_decl_file.out",
cwd: Some("publish/javascript_decl_file"),
- envs: env_vars_for_registry(),
+ envs: env_vars_for_jsr_tests(),
http_server: true,
exit_code: 0,
});
@@ -154,7 +148,7 @@ itest!(successful {
args: "publish --token 'sadfasdf'",
output: "publish/successful.out",
cwd: Some("publish/successful"),
- envs: env_vars_for_registry(),
+ envs: env_vars_for_jsr_tests(),
http_server: true,
});
@@ -162,7 +156,7 @@ itest!(node_specifier {
args: "publish --token 'sadfasdf'",
output: "publish/node_specifier.out",
cwd: Some("publish/node_specifier"),
- envs: env_vars_for_registry()
+ envs: env_vars_for_jsr_tests()
.into_iter()
.chain(env_vars_for_npm_tests().into_iter())
.collect(),
@@ -173,7 +167,7 @@ itest!(config_file_jsonc {
args: "publish --token 'sadfasdf'",
output: "publish/deno_jsonc.out",
cwd: Some("publish/deno_jsonc"),
- envs: env_vars_for_registry(),
+ envs: env_vars_for_jsr_tests(),
http_server: true,
});
@@ -181,7 +175,7 @@ itest!(workspace_all {
args: "publish --token 'sadfasdf'",
output: "publish/workspace.out",
cwd: Some("publish/workspace"),
- envs: env_vars_for_registry(),
+ envs: env_vars_for_jsr_tests(),
http_server: true,
});
@@ -189,7 +183,7 @@ itest!(workspace_individual {
args: "publish --token 'sadfasdf'",
output: "publish/workspace_individual.out",
cwd: Some("publish/workspace/bar"),
- envs: env_vars_for_registry(),
+ envs: env_vars_for_jsr_tests(),
http_server: true,
});
@@ -197,7 +191,7 @@ itest!(dry_run {
args: "publish --token 'sadfasdf' --dry-run",
cwd: Some("publish/successful"),
output: "publish/dry_run.out",
- envs: env_vars_for_registry(),
+ envs: env_vars_for_jsr_tests(),
http_server: true,
});
@@ -278,6 +272,6 @@ fn includes_directories() {
fn publish_context_builder() -> TestContextBuilder {
TestContextBuilder::new()
.use_http_server()
- .envs(env_vars_for_registry())
+ .envs(env_vars_for_jsr_tests())
.use_temp_cwd()
}
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index d722b23c7..17f4a3981 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -1059,8 +1059,8 @@ fn lock_deno_json_package_json_deps() {
}
},
"remote": {
- "http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/mod.ts": "5b0ce36e08d759118200d8b4627627b5a89b6261fbb0598e6961a6b287abb699",
- "http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts": "9ce27ca439cb0e218b6e1ec26c043dbc0b54c9babc4cb432df478dd1721faade"
+ "http://127.0.0.1:4250/@denotest/module_graph/1.4.0/mod.ts": "5b0ce36e08d759118200d8b4627627b5a89b6261fbb0598e6961a6b287abb699",
+ "http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts": "9ce27ca439cb0e218b6e1ec26c043dbc0b54c9babc4cb432df478dd1721faade"
},
"workspace": {
"dependencies": [
@@ -1109,8 +1109,8 @@ fn lock_deno_json_package_json_deps() {
}
},
"remote": {
- "http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/mod.ts": "5b0ce36e08d759118200d8b4627627b5a89b6261fbb0598e6961a6b287abb699",
- "http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts": "9ce27ca439cb0e218b6e1ec26c043dbc0b54c9babc4cb432df478dd1721faade"
+ "http://127.0.0.1:4250/@denotest/module_graph/1.4.0/mod.ts": "5b0ce36e08d759118200d8b4627627b5a89b6261fbb0598e6961a6b287abb699",
+ "http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts": "9ce27ca439cb0e218b6e1ec26c043dbc0b54c9babc4cb432df478dd1721faade"
},
"workspace": {
"dependencies": [
@@ -1141,8 +1141,8 @@ fn lock_deno_json_package_json_deps() {
}
},
"remote": {
- "http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/mod.ts": "5b0ce36e08d759118200d8b4627627b5a89b6261fbb0598e6961a6b287abb699",
- "http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts": "9ce27ca439cb0e218b6e1ec26c043dbc0b54c9babc4cb432df478dd1721faade"
+ "http://127.0.0.1:4250/@denotest/module_graph/1.4.0/mod.ts": "5b0ce36e08d759118200d8b4627627b5a89b6261fbb0598e6961a6b287abb699",
+ "http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts": "9ce27ca439cb0e218b6e1ec26c043dbc0b54c9babc4cb432df478dd1721faade"
},
"workspace": {
"dependencies": [
diff --git a/cli/tests/testdata/jsr/deps/main.out b/cli/tests/testdata/jsr/deps/main.out
index 388e1a6d5..621703c4b 100644
--- a/cli/tests/testdata/jsr/deps/main.out
+++ b/cli/tests/testdata/jsr/deps/main.out
@@ -1,13 +1,13 @@
-Download http://localhost:4545/jsr/registry/@denotest/deps/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/deps/1.0.0_meta.json
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0_meta.json
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1_meta.json
+Download http://127.0.0.1:4250/@denotest/deps/meta.json
+Download http://127.0.0.1:4250/@denotest/deps/1.0.0_meta.json
+Download http://127.0.0.1:4250/@denotest/module_graph/meta.json
+Download http://127.0.0.1:4250/@denotest/no_module_graph/meta.json
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0_meta.json
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1_meta.json
[UNORDERED_START]
-Download http://localhost:4545/jsr/registry/@denotest/deps/1.0.0/mod.ts
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/mod.ts
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts
+Download http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/mod.ts
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/TestClass.ts
[UNORDERED_END]
{ version: "0.1.1", other: Other {} }
diff --git a/cli/tests/testdata/jsr/deps/main_info.out b/cli/tests/testdata/jsr/deps/main_info.out
index c100e1363..c4d412707 100644
--- a/cli/tests/testdata/jsr/deps/main_info.out
+++ b/cli/tests/testdata/jsr/deps/main_info.out
@@ -1,14 +1,14 @@
-Download http://localhost:4545/jsr/registry/@denotest/deps/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/deps/1.0.0_meta.json
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0_meta.json
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1_meta.json
+Download http://127.0.0.1:4250/@denotest/deps/meta.json
+Download http://127.0.0.1:4250/@denotest/deps/1.0.0_meta.json
+Download http://127.0.0.1:4250/@denotest/module_graph/meta.json
+Download http://127.0.0.1:4250/@denotest/no_module_graph/meta.json
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0_meta.json
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1_meta.json
[UNORDERED_START]
-Download http://localhost:4545/jsr/registry/@denotest/deps/1.0.0/mod.ts
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/mod.ts
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts
+Download http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/mod.ts
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/TestClass.ts
[UNORDERED_END]
local: [WILDCARD]main.ts
type: TypeScript
@@ -16,7 +16,7 @@ dependencies: 4 unique
size: [WILDCARD]
file:///[WILDCARD]main.ts ([WILDCARD])
-└─┬ http://localhost:4545/jsr/registry/@denotest/deps/1.0.0/mod.ts ([WILDCARD])
- ├── http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts ([WILDCARD])
- └─┬ http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/mod.ts ([WILDCARD])
- └── http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts ([WILDCARD])
+└─┬ http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts ([WILDCARD])
+ ├── http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts ([WILDCARD])
+ └─┬ http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/mod.ts ([WILDCARD])
+ └── http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/TestClass.ts ([WILDCARD])
diff --git a/cli/tests/testdata/jsr/module_graph/main.out b/cli/tests/testdata/jsr/module_graph/main.out
index c1c8d039d..1cd0115b9 100644
--- a/cli/tests/testdata/jsr/module_graph/main.out
+++ b/cli/tests/testdata/jsr/module_graph/main.out
@@ -1,7 +1,7 @@
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0_meta.json
+Download http://127.0.0.1:4250/@denotest/module_graph/meta.json
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0_meta.json
[UNORDERED_START]
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/mod.ts
[UNORDERED_END]
Test { other: Other {} }
diff --git a/cli/tests/testdata/jsr/module_graph/main_info.out b/cli/tests/testdata/jsr/module_graph/main_info.out
index 4bb8388ed..c35cca5b4 100644
--- a/cli/tests/testdata/jsr/module_graph/main_info.out
+++ b/cli/tests/testdata/jsr/module_graph/main_info.out
@@ -1,8 +1,8 @@
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0_meta.json
+Download http://127.0.0.1:4250/@denotest/module_graph/meta.json
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0_meta.json
[UNORDERED_START]
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/mod.ts
-Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts
[UNORDERED_END]
local: [WILDCARD]main.ts
type: TypeScript
@@ -10,5 +10,5 @@ dependencies: 2 unique
size: [WILDCARD]
file:///[WILDCARD]/module_graph/main.ts ([WILDCARD])
-└─┬ http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/mod.ts ([WILDCARD])
- └── http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts ([WILDCARD])
+└─┬ http://127.0.0.1:4250/@denotest/module_graph/1.4.0/mod.ts ([WILDCARD])
+ └── http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts ([WILDCARD])
diff --git a/cli/tests/testdata/jsr/no_module_graph/main.out b/cli/tests/testdata/jsr/no_module_graph/main.out
index 70cae572d..da9b67e11 100644
--- a/cli/tests/testdata/jsr/no_module_graph/main.out
+++ b/cli/tests/testdata/jsr/no_module_graph/main.out
@@ -1,6 +1,6 @@
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0_meta.json
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/mod.ts
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts
+Download http://127.0.0.1:4250/@denotest/no_module_graph/meta.json
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0_meta.json
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/TestClass.ts
0.1.0
TestClass {}
diff --git a/cli/tests/testdata/jsr/no_module_graph/main_info.out b/cli/tests/testdata/jsr/no_module_graph/main_info.out
index 282e0580c..0293e4120 100644
--- a/cli/tests/testdata/jsr/no_module_graph/main_info.out
+++ b/cli/tests/testdata/jsr/no_module_graph/main_info.out
@@ -1,12 +1,12 @@
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0_meta.json
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/mod.ts
-Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts
+Download http://127.0.0.1:4250/@denotest/no_module_graph/meta.json
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0_meta.json
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/TestClass.ts
local: [WILDCARD]main.ts
type: TypeScript
dependencies: 2 unique
size: [WILDCARD]
file:///[WILDCARD]/jsr/no_module_graph/main.ts ([WILDCARD])
-└─┬ http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/mod.ts ([WILDCARD])
- └── http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts ([WILDCARD])
+└─┬ http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/mod.ts ([WILDCARD])
+ └── http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/TestClass.ts ([WILDCARD])
diff --git a/cli/tests/testdata/jsr/subset_type_graph/main.check.out b/cli/tests/testdata/jsr/subset_type_graph/main.check.out
index fc4539c8a..278884579 100644
--- a/cli/tests/testdata/jsr/subset_type_graph/main.check.out
+++ b/cli/tests/testdata/jsr/subset_type_graph/main.check.out
@@ -1,16 +1,16 @@
-Download http://localhost:4545/jsr/registry/@denotest/subset_type_graph/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/subset_type_graph_invalid/meta.json
-Download http://localhost:4545/jsr/registry/@denotest/subset_type_graph/0.1.0_meta.json
-Download http://localhost:4545/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0_meta.json
+Download http://127.0.0.1:4250/@denotest/subset_type_graph/meta.json
+Download http://127.0.0.1:4250/@denotest/subset_type_graph_invalid/meta.json
+Download http://127.0.0.1:4250/@denotest/subset_type_graph/0.1.0_meta.json
+Download http://127.0.0.1:4250/@denotest/subset_type_graph_invalid/0.1.0_meta.json
[UNORDERED_START]
-Download http://localhost:4545/jsr/registry/@denotest/subset_type_graph/0.1.0/mod.ts
-Download http://localhost:4545/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/subset_type_graph/0.1.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/subset_type_graph_invalid/0.1.0/mod.ts
[UNORDERED_END]
Check file:///[WILDCARD]/subset_type_graph/main.ts
error: TS2322 [ERROR]: Type 'string' is not assignable to type 'number'.
const invalidTypeCheck: number = "";
~~~~~~~~~~~~~~~~
- at http://localhost:4545/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0/mod.ts:11:7
+ at http://127.0.0.1:4250/@denotest/subset_type_graph_invalid/0.1.0/mod.ts:11:7
TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
const error1: string = new Foo1().method();
@@ -30,7 +30,7 @@ new Foo1().method2();
'method' is declared here.
method(): number {
~~~~~~
- at http://localhost:4545/jsr/registry/@denotest/subset_type_graph/0.1.0/mod.ts:8:3
+ at http://127.0.0.1:4250/@denotest/subset_type_graph/0.1.0/mod.ts:8:3
TS2551 [ERROR]: Property 'method2' does not exist on type 'Foo'. Did you mean 'method'?
new Foo2().method2();
@@ -40,6 +40,6 @@ new Foo2().method2();
'method' is declared here.
method() {
~~~~~~
- at http://localhost:4545/jsr/registry/@denotest/subset_type_graph_invalid/0.1.0/mod.ts:2:3
+ at http://127.0.0.1:4250/@denotest/subset_type_graph_invalid/0.1.0/mod.ts:2:3
Found 5 errors.
diff --git a/cli/tests/testdata/jsr/version_not_found/main.out b/cli/tests/testdata/jsr/version_not_found/main.out
index ec9a2ee96..5ebe13c73 100644
--- a/cli/tests/testdata/jsr/version_not_found/main.out
+++ b/cli/tests/testdata/jsr/version_not_found/main.out
@@ -1,4 +1,4 @@
-Download http://localhost:4545/jsr/registry/@denotest/deps/meta.json
+Download http://127.0.0.1:4250/@denotest/deps/meta.json
error: Could not find constraint in the list of versions: @denotest/deps@0.1.4
Specifier: jsr:@denotest/deps@0.1.4/mod.ts
at file:///[WILDCARD]/version_not_found/main.ts:1:19
diff --git a/cli/tests/testdata/publish/no_zap.out b/cli/tests/testdata/publish/no_zap.out
index ac26c67c2..109964903 100644
--- a/cli/tests/testdata/publish/no_zap.out
+++ b/cli/tests/testdata/publish/no_zap.out
@@ -1,4 +1,5 @@
Ensuring type checks...
Check file:///[WILDCARD]/mod.ts
-error: Following packages don't exist, follow the links and create them:
- - https://jsr.io/new?scope=foo&package=bar&from=cli
+Publishing @foo/bar@1.1.0 ...
+Successfully published @foo/bar@1.1.0
+Visit http://127.0.0.1:4250/@foo/bar@1.1.0 for details
diff --git a/test_util/src/builders.rs b/test_util/src/builders.rs
index 8d04dae48..f0002b52f 100644
--- a/test_util/src/builders.rs
+++ b/test_util/src/builders.rs
@@ -24,6 +24,7 @@ use crate::env_vars_for_jsr_tests;
use crate::env_vars_for_npm_tests;
use crate::fs::PathRef;
use crate::http_server;
+use crate::jsr_registry_unset_url;
use crate::lsp::LspClientBuilder;
use crate::npm_registry_unset_url;
use crate::pty::Pty;
@@ -686,6 +687,9 @@ impl TestCommandBuilder {
if !envs.contains_key("DENO_NO_UPDATE_CHECK") {
envs.insert("DENO_NO_UPDATE_CHECK".to_string(), "1".to_string());
}
+ if !envs.contains_key("DENO_REGISTRY_URL") {
+ envs.insert("DENO_REGISTRY_URL".to_string(), jsr_registry_unset_url());
+ }
for key in &self.envs_remove {
envs.remove(key);
}
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs
index bcd58a3a6..9bf68cbc2 100644
--- a/test_util/src/lib.rs
+++ b/test_util/src/lib.rs
@@ -100,7 +100,11 @@ pub fn npm_registry_unset_url() -> String {
}
pub fn jsr_registry_url() -> String {
- "http://localhost:4545/jsr/registry/".to_string()
+ "http://127.0.0.1:4250/".to_string()
+}
+
+pub fn jsr_registry_unset_url() -> String {
+ "http://DENO_REGISTRY_URL.is.unset".to_string()
}
pub fn std_path() -> PathRef {
@@ -441,6 +445,7 @@ pub fn deno_cmd_with_deno_dir(deno_dir: &TempDir) -> TestCommandBuilder {
TestCommandBuilder::new(deno_dir.clone())
.env("DENO_DIR", deno_dir.path())
.env("NPM_CONFIG_REGISTRY", npm_registry_unset_url())
+ .env("DENO_REGISTRY_URL", jsr_registry_unset_url())
}
pub fn run_powershell_script_file(