From f1882ba5203f7ffa95d2ae668deee18dfab5b25b Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Fri, 28 Nov 2025 12:59:40 +0900 Subject: [PATCH] test: enable some assertions which were commented out --- lib/test/lib/http-proxy-passes-web-incoming.test.ts | 6 +++--- lib/test/lib/https-proxy.test.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/test/lib/http-proxy-passes-web-incoming.test.ts b/lib/test/lib/http-proxy-passes-web-incoming.test.ts index ba85b37..e41be68 100644 --- a/lib/test/lib/http-proxy-passes-web-incoming.test.ts +++ b/lib/test/lib/http-proxy-passes-web-incoming.test.ts @@ -539,7 +539,7 @@ describe("#createProxyServer.web() using own http server", () => { source.close(); proxy.close(); expect(req.method).toEqual("GET"); - // expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`); + expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`); res.end(); done(); }) @@ -605,7 +605,7 @@ describe("#createProxyServer.web() using own http server", () => { const source1 = http.createServer((req, res) => { expect(req.method).toEqual("GET"); - //expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`); + expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`); expect(req.url).toEqual("/test1"); res.end(); }); @@ -615,7 +615,7 @@ describe("#createProxyServer.web() using own http server", () => { source2.close(); proxyServer.close(); expect(req.method).toEqual("GET"); - //expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`); + expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`); expect(req.url).toEqual("/test2"); res.end(); done(); diff --git a/lib/test/lib/https-proxy.test.ts b/lib/test/lib/https-proxy.test.ts index 58d7fda..acb2510 100644 --- a/lib/test/lib/https-proxy.test.ts +++ b/lib/test/lib/https-proxy.test.ts @@ -28,7 +28,7 @@ describe("HTTPS to HTTP", () => { const source = http .createServer((req, res) => { expect(req.method).toEqual("GET"); - // expect(req.headers.host?.split(":")[1]).toEqual(`${ports.proxy}`); + expect(req.headers.host?.split(":")[1]).toEqual(`${ports.proxy}`); res.writeHead(200, { "Content-Type": "text/plain" }); res.end("Hello from " + ports.source); })