From ee4bfe16009c3a04c9015bf9fca0c9b0f9a3a601 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Fri, 5 Apr 2024 17:42:26 +0530 Subject: fix(ext/node): hostname is valid IPv4 addr (#23243) Fixes `docusaurus serve` --- tests/unit_node/http_test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/unit_node') diff --git a/tests/unit_node/http_test.ts b/tests/unit_node/http_test.ts index 57ade6298..049cdbbbc 100644 --- a/tests/unit_node/http_test.ts +++ b/tests/unit_node/http_test.ts @@ -27,7 +27,9 @@ Deno.test("[node/http listen]", async () => { const { promise, resolve } = Promise.withResolvers(); const server = http.createServer(); - server.listen(() => { + server.listen(42453, "localhost", () => { + // @ts-ignore address() is not a string + assertEquals(server.address()!.address, "127.0.0.1"); server.close(); }); server.on("close", () => { -- cgit v1.2.3