diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-06-08 20:32:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-08 20:32:26 +0200 |
commit | c775001466861eda14c037c8bc02706222e62fd5 (patch) | |
tree | 4f765f7f367afacf4b7cb6aa0c07dc5bdacb7698 /cli/tests/unit_node/http_test.ts | |
parent | 1d4c66308c00d56910cf60a4f7b269381c898e38 (diff) |
chore(ext/node): revert changes to ClientRequest.onSocket (#19426)
Partially reverts https://github.com/denoland/deno/pull/19340
because it causes hangs in some situations.
Diffstat (limited to 'cli/tests/unit_node/http_test.ts')
-rw-r--r-- | cli/tests/unit_node/http_test.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cli/tests/unit_node/http_test.ts b/cli/tests/unit_node/http_test.ts index 6b0228274..8f87b1fd2 100644 --- a/cli/tests/unit_node/http_test.ts +++ b/cli/tests/unit_node/http_test.ts @@ -195,14 +195,11 @@ Deno.test("[node/http] request default protocol", async () => { // @ts-ignore IncomingMessageForClient // deno-lint-ignore no-explicit-any let clientRes: any; - // deno-lint-ignore no-explicit-any - let clientReq: any; server.listen(() => { - clientReq = http.request( + const req = http.request( // deno-lint-ignore no-explicit-any { host: "localhost", port: (server.address() as any).port }, (res) => { - assert(res.socket instanceof EventEmitter); assertEquals(res.complete, false); res.on("data", () => {}); res.on("end", () => { @@ -213,14 +210,13 @@ Deno.test("[node/http] request default protocol", async () => { promise2.resolve(); }, ); - clientReq.end(); + req.end(); }); server.on("close", () => { promise.resolve(); }); await promise; await promise2; - assert(clientReq.socket instanceof EventEmitter); assertEquals(clientRes!.complete, true); }); |