Skip to content

Commit 50f0722

Browse files
author
vhess
committed
listen to correct timeout code
1 parent 11180ed commit 50f0722

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import * as http from "node:http";
1212
import concat from "concat-stream";
1313
import * as async from "async";
1414
import getPort from "../get-port";
15-
import { describe, it, expect } from "vitest";
15+
import { describe, it, expect, beforeAll } from "vitest";
1616

1717
describe("#deleteLength", () => {
1818
it("should change `content-length` for DELETE requests", () => {
@@ -95,7 +95,7 @@ function port(p: number | string) {
9595
}
9696

9797
describe("#createProxyServer.web() using own http server", () => {
98-
it("gets some ports", async () => {
98+
beforeAll(async () => {
9999
for (let n = 8080; n < 8090; n++) {
100100
ports[`${n}`] = await getPort();
101101
}
@@ -358,7 +358,7 @@ describe("#createProxyServer.web() using own http server", () => {
358358
expect(Date.now() - started).toBeGreaterThan(99);
359359
expect((err as NodeJS.ErrnoException).code).toBeOneOf([
360360
"ECONNRESET",
361-
"UND_ERR_HEADERS_TIMEOUT",
361+
23,
362362
]);
363363
done();
364364
});
@@ -435,7 +435,7 @@ describe("#createProxyServer.web() using own http server", () => {
435435
req.end();
436436
}));
437437

438-
it.skipIf(() => process.env.FORCE_FETCH_PATH === "true")(
438+
it(
439439
"should proxy the request and provide a proxyRes event with the request and response parameters",
440440
() =>
441441
new Promise<void>((done) => {

0 commit comments

Comments
 (0)