diff --git a/tests/unit_node/http_test.ts b/tests/unit_node/http_test.ts index ec2c5807c6..30d86805f4 100644 --- a/tests/unit_node/http_test.ts +++ b/tests/unit_node/http_test.ts @@ -1009,7 +1009,7 @@ Deno.test( request.on("close", () => {}); request.end(); setTimeout(() => { - request.destroy(); + request.destroy(new Error()); resolve(); }, 100); @@ -1024,7 +1024,6 @@ Deno.test( "[node/http] client destroy before sending request should not error", async () => { const { resolve, promise } = Promise.withResolvers(); - // TODO(kt3k): This should be "localhost" when we implemented happy-eyeballs for node:net const request = http.request("http://localhost:5929/"); // Calling this would throw request.destroy(); diff --git a/tests/unit_node/tls_test.ts b/tests/unit_node/tls_test.ts index 628d0ade1f..236dab2086 100644 --- a/tests/unit_node/tls_test.ts +++ b/tests/unit_node/tls_test.ts @@ -213,7 +213,7 @@ Deno.test("tls.connect() throws InvalidData when there's error in certificate", host: "localhost", port: 4557, }); - conn.on("data", () => {}); + conn.on("error", (err) => { console.log(err); });