From 88de90704ed8443cf9c9e0c6cf92c5fac8893e47 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:34:10 +0200 Subject: [PATCH] test(init): fix address in use (#3532) Reverting back to the old init script also re-introduced the "address in use" problem. This does not have any effect: `env: { PORT: "0" }` Adding arguments to `deno task start` also have no effect. The only solution I can come up with is to ignore the task and call `deno serve` with proper arguments directly for the build tests. --- packages/init/src/init_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/init/src/init_test.ts b/packages/init/src/init_test.ts index b91a67ae..65a938ea 100644 --- a/packages/init/src/init_test.ts +++ b/packages/init/src/init_test.ts @@ -255,7 +255,7 @@ Deno.test("init - can start built project", async () => { }).output(); await withChildProcessServer( - { cwd: dir, env: { PORT: "0" }, args: ["task", "start"] }, + { cwd: dir, args: ["serve", "-A", "--port", "0", "_fresh/server.js"] }, async (address) => { await withBrowser(async (page) => { await page.goto(address); @@ -338,7 +338,7 @@ Deno.test.ignore("init - vite build", async () => { }).output(); await withChildProcessServer( - { cwd: dir, env: { PORT: "0" }, args: ["task", "start"] }, + { cwd: dir, args: ["serve", "-A", "--port", "0", "_fresh/server.js"] }, async (address) => { await withBrowser(async (page) => { await page.goto(address);