tests: fix leaks, macOS hangs and utility cleanups (#2897)

1. Upgrades `@astral/astral`
2. Fixes test leaks
3. Fixes `@fresh/init` test hangs
4. Simplifies and cleans up test utilities
This commit is contained in:
Asher Gomez
2025-05-07 10:53:42 +02:00
committed by GitHub
parent cea7a2a821
commit 54d18d8bca
7 changed files with 223 additions and 222 deletions
+4 -4
View File
@@ -176,7 +176,7 @@ Deno.test("init - can start dev server", async () => {
await patchProject(dir);
await withChildProcessServer(
dir,
path.join(dir, "dev.ts"),
"dev",
async (address) => {
await withBrowser(async (page) => {
await page.goto(address);
@@ -201,7 +201,7 @@ Deno.test("init - can start built project", async () => {
// Build
await new Deno.Command(Deno.execPath(), {
args: ["run", "-A", path.join(dir, "dev.ts"), "build"],
args: ["task", "build"],
stdin: "null",
stdout: "piped",
stderr: "piped",
@@ -210,7 +210,7 @@ Deno.test("init - can start built project", async () => {
await withChildProcessServer(
dir,
path.join(dir, "main.ts"),
"start",
async (address) => {
await withBrowser(async (page) => {
await page.goto(address);
@@ -234,7 +234,7 @@ Deno.test("init - errors on missing build cache in prod", async () => {
await patchProject(dir);
const cp = await new Deno.Command(Deno.execPath(), {
args: ["run", "-A", "main.ts"],
args: ["task", "start"],
stdin: "null",
stdout: "piped",
stderr: "piped",