Skip to content

Commit 450e88b

Browse files
committed
test: use '127.0.0.1' instead of localhost
1 parent 86ed893 commit 450e88b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/undici-http-handler/src/undici-http-handler.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function createMockRequest(overrides: Partial<HttpRequest> = {}): HttpRequest {
1313
return Object.assign(
1414
new HttpRequest({
1515
protocol: "http:",
16-
hostname: "localhost",
16+
hostname: "127.0.0.1",
1717
port,
1818
method: "GET",
1919
path: "/",
@@ -538,7 +538,7 @@ describe("UndiciHttpHandler", () => {
538538

539539
// Old external dispatcher should still be usable (not destroyed)
540540
const { statusCode } = await oldDispatcher.request({
541-
origin: `http://localhost:${port}`,
541+
origin: `http://127.0.0.1:${port}`,
542542
path: "/",
543543
method: "GET",
544544
});
@@ -559,7 +559,7 @@ describe("UndiciHttpHandler", () => {
559559

560560
// The dispatcher should still be functional since it's external
561561
const { statusCode } = await newDispatcher.request({
562-
origin: `http://localhost:${port}`,
562+
origin: `http://127.0.0.1:${port}`,
563563
path: "/",
564564
method: "GET",
565565
});

0 commit comments

Comments
 (0)