diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-06-14 22:59:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-14 22:59:27 +0200 |
commit | fc4e4c3e93c337ae2b549cf618f69c87a9647a4f (patch) | |
tree | 302ccc0c54f536e3a2f4b7e24fcc3887e2161edc /cli/tests | |
parent | 88e6e9c1e6263f326d30b7fcc33465e0428faf33 (diff) |
chore(ext/node): bring back changes to ClientRequest.onSocket (#19509)
Reverts denoland/deno#19426
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit_node/http_test.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/tests/unit_node/http_test.ts b/cli/tests/unit_node/http_test.ts index 4732781f8..d54368003 100644 --- a/cli/tests/unit_node/http_test.ts +++ b/cli/tests/unit_node/http_test.ts @@ -196,11 +196,14 @@ 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(() => { - const req = http.request( + clientReq = 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", () => { @@ -211,13 +214,14 @@ Deno.test("[node/http] request default protocol", async () => { promise2.resolve(); }, ); - req.end(); + clientReq.end(); }); server.on("close", () => { promise.resolve(); }); await promise; await promise2; + assert(clientReq.socket instanceof EventEmitter); assertEquals(clientRes!.complete, true); }); |