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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user