Skip to content

Commit

Permalink
test: update deno test with explicit host
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 18, 2023
1 parent f421530 commit 8cce508
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/presets/deno-server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ describe.runIf(hasDeno)("nitro:preset:deno-server", async () => {
{
stdio: "inherit",
env: {
PORT: String(port),
NITRO_PORT: String(port),
NITRO_HOST: "127.0.0.1",
},
}
);
ctx.server = {
url: `http://127.0.0.1:${port}`,
close: () => p.kill(),
} as any;
await waitForPort(port, { delay: 1000, retries: 20 });
await waitForPort(port, { delay: 1000, retries: 20, host: "127.0.0.1" });
return async ({ url, ...opts }) => {
const res = await ctx.fetch(url, opts);
return res;
Expand Down

0 comments on commit 8cce508

Please sign in to comment.