Skip to content

Commit

Permalink
chore: update fallback message
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 7, 2023
1 parent d537a51 commit 1f45050
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/_internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function _validateHostname(
verbose,
`Invalid hostname: ${JSON.stringify(hostname)}. Using ${JSON.stringify(
fallbackHost,
)}`,
)} as fallback.`,
);
return fallbackHost;
}
Expand Down
4 changes: 2 additions & 2 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe("errors", () => {
(error) => error,
);
expect(console.log).toHaveBeenCalledWith(
'[get-port] Invalid hostname: "http://localhost:8080". Using "127.0.0.1"',
'[get-port] Invalid hostname: "http://localhost:8080". Using "127.0.0.1" as fallback.',
);
vi.resetAllMocks();
});
Expand All @@ -96,7 +96,7 @@ describe("errors", () => {
public: true,
}).catch((error) => error);
expect(console.log).toHaveBeenCalledWith(
'[get-port] Invalid hostname: "http://localhost:8080". Using "0.0.0.0"',
'[get-port] Invalid hostname: "http://localhost:8080". Using "0.0.0.0" as fallback.',
);
vi.resetAllMocks();
});
Expand Down

0 comments on commit 1f45050

Please sign in to comment.