diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-09-12 10:46:48 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-12 10:46:48 +1000 |
commit | 8476bbff9af28408bc6a9b0a7b2303cb3803422e (patch) | |
tree | 7d06c3fb248c39b5924686213275b57df8d01fc7 /tests | |
parent | 3a3837545ce6f585f718069cc05d96f765a05d3f (diff) |
feat: stabilize `Deno.createHttpClient()` (#25569)
Closes #25518
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/js_unit_tests.rs | 3 | ||||
-rw-r--r-- | tests/integration/node_unit_tests.rs | 1 | ||||
-rw-r--r-- | tests/integration/run_tests.rs | 11 | ||||
-rw-r--r-- | tests/specs/run/045_proxy/proxy_test.ts | 1 | ||||
-rw-r--r-- | tests/specs/run/unstable/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/run/unstable/http.out | 7 | ||||
-rw-r--r-- | tests/specs/run/unstable/http.ts | 1 | ||||
-rw-r--r-- | tests/testdata/run/unstable_http.disabled.out | 4 | ||||
-rw-r--r-- | tests/testdata/run/unstable_http.enabled.out | 4 | ||||
-rw-r--r-- | tests/testdata/run/unstable_http.js | 11 |
10 files changed, 1 insertions, 47 deletions
diff --git a/tests/integration/js_unit_tests.rs b/tests/integration/js_unit_tests.rs index be2af84a8..5efb0f268 100644 --- a/tests/integration/js_unit_tests.rs +++ b/tests/integration/js_unit_tests.rs @@ -122,9 +122,8 @@ fn js_unit_test(test: String) { .arg("--no-lock") // TODO(bartlomieju): would be better if we could apply this unstable // flag to particular files, but there's many of them that rely on unstable - // net APIs (`reusePort` in `listen` and `listenTls`; `listenDatagram`, `createHttpClient`) + // net APIs (`reusePort` in `listen` and `listenTls`; `listenDatagram`) .arg("--unstable-net") - .arg("--unstable-http") .arg("--location=http://127.0.0.1:4545/") .arg("--no-prompt"); diff --git a/tests/integration/node_unit_tests.rs b/tests/integration/node_unit_tests.rs index 3bec6bb7d..c8b5b25fb 100644 --- a/tests/integration/node_unit_tests.rs +++ b/tests/integration/node_unit_tests.rs @@ -112,7 +112,6 @@ fn node_unit_test(test: String) { .arg(deno_config_path()) .arg("--no-lock") .arg("--unstable-broadcast-channel") - .arg("--unstable-http") .arg("--unstable-net") // TODO(kt3k): This option is required to pass tls_test.ts, // but this shouldn't be necessary. tls.connect currently doesn't diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs index 6f85aaf0b..7140c2cfa 100644 --- a/tests/integration/run_tests.rs +++ b/tests/integration/run_tests.rs @@ -1829,17 +1829,6 @@ itest!(unstable_cron_enabled { output: "run/unstable_cron.enabled.out", }); -itest!(unstable_http_disabled { - args: "run --quiet --reload --allow-read run/unstable_http.js", - output: "run/unstable_http.disabled.out", -}); - -itest!(unstable_http_enabled { - args: - "run --quiet --reload --allow-read --unstable-http run/unstable_http.js", - output: "run/unstable_http.enabled.out", -}); - itest!(unstable_net_disabled { args: "run --quiet --reload --allow-read run/unstable_net.js", output: "run/unstable_net.disabled.out", diff --git a/tests/specs/run/045_proxy/proxy_test.ts b/tests/specs/run/045_proxy/proxy_test.ts index 8ef7cf3da..22115a3aa 100644 --- a/tests/specs/run/045_proxy/proxy_test.ts +++ b/tests/specs/run/045_proxy/proxy_test.ts @@ -108,7 +108,6 @@ async function testFetchProgrammaticProxy() { "--quiet", "--reload", "--allow-net=localhost:4545,localhost:4555", - "--unstable-http", "programmatic_proxy_client.ts", ], }).output(); diff --git a/tests/specs/run/unstable/__test__.jsonc b/tests/specs/run/unstable/__test__.jsonc index 5748c5461..3ddcdb583 100644 --- a/tests/specs/run/unstable/__test__.jsonc +++ b/tests/specs/run/unstable/__test__.jsonc @@ -10,11 +10,6 @@ "exitCode": 1, "output": "cron.out" }, - "http": { - "args": "run http.ts", - "exitCode": 1, - "output": "http.out" - }, "http_wss": { "args": "run http_wss.ts", "exitCode": 1, diff --git a/tests/specs/run/unstable/http.out b/tests/specs/run/unstable/http.out deleted file mode 100644 index 55e143c25..000000000 --- a/tests/specs/run/unstable/http.out +++ /dev/null @@ -1,7 +0,0 @@ -error: Uncaught (in promise) TypeError: Deno.createHttpClient is not a function -Deno.createHttpClient(); - ^ - at [WILDCARD]http.ts:1:6 - - info: Deno.createHttpClient() is an unstable API. - hint: Run again with `--unstable-http` flag to enable this API. diff --git a/tests/specs/run/unstable/http.ts b/tests/specs/run/unstable/http.ts deleted file mode 100644 index 568d6a7cc..000000000 --- a/tests/specs/run/unstable/http.ts +++ /dev/null @@ -1 +0,0 @@ -Deno.createHttpClient(); diff --git a/tests/testdata/run/unstable_http.disabled.out b/tests/testdata/run/unstable_http.disabled.out deleted file mode 100644 index 3562f72fd..000000000 --- a/tests/testdata/run/unstable_http.disabled.out +++ /dev/null @@ -1,4 +0,0 @@ -main undefined -main undefined -worker undefined -worker undefined diff --git a/tests/testdata/run/unstable_http.enabled.out b/tests/testdata/run/unstable_http.enabled.out deleted file mode 100644 index f7aa776e9..000000000 --- a/tests/testdata/run/unstable_http.enabled.out +++ /dev/null @@ -1,4 +0,0 @@ -main [class HttpClient] -main [Function: createHttpClient] -worker [class HttpClient] -worker [Function: createHttpClient] diff --git a/tests/testdata/run/unstable_http.js b/tests/testdata/run/unstable_http.js deleted file mode 100644 index 7ad09aec5..000000000 --- a/tests/testdata/run/unstable_http.js +++ /dev/null @@ -1,11 +0,0 @@ -const scope = import.meta.url.slice(-7) === "#worker" ? "worker" : "main"; - -console.log(scope, Deno.HttpClient); -console.log(scope, Deno.createHttpClient); - -if (scope === "worker") { - postMessage("done"); -} else { - const worker = new Worker(`${import.meta.url}#worker`, { type: "module" }); - worker.onmessage = () => Deno.exit(0); -} |