Skip to content

Commit 0bbd19e

Browse files
authored
Merge pull request #44 from sapphi-red/test/enable-some-assertions-which-were-commented-out
test: enable some assertions which were commented out
2 parents d8ca477 + f1882ba commit 0bbd19e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/test/lib/http-proxy-passes-web-incoming.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ describe("#createProxyServer.web() using own http server", () => {
539539
source.close();
540540
proxy.close();
541541
expect(req.method).toEqual("GET");
542-
// expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`);
542+
expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`);
543543
res.end();
544544
done();
545545
})
@@ -605,7 +605,7 @@ describe("#createProxyServer.web() using own http server", () => {
605605

606606
const source1 = http.createServer((req, res) => {
607607
expect(req.method).toEqual("GET");
608-
//expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`);
608+
expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`);
609609
expect(req.url).toEqual("/test1");
610610
res.end();
611611
});
@@ -615,7 +615,7 @@ describe("#createProxyServer.web() using own http server", () => {
615615
source2.close();
616616
proxyServer.close();
617617
expect(req.method).toEqual("GET");
618-
//expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`);
618+
expect(req.headers.host?.split(":")[1]).toEqual(`${port(8080)}`);
619619
expect(req.url).toEqual("/test2");
620620
res.end();
621621
done();

lib/test/lib/https-proxy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("HTTPS to HTTP", () => {
2828
const source = http
2929
.createServer((req, res) => {
3030
expect(req.method).toEqual("GET");
31-
// expect(req.headers.host?.split(":")[1]).toEqual(`${ports.proxy}`);
31+
expect(req.headers.host?.split(":")[1]).toEqual(`${ports.proxy}`);
3232
res.writeHead(200, { "Content-Type": "text/plain" });
3333
res.end("Hello from " + ports.source);
3434
})

0 commit comments

Comments
 (0)