Skip to content

Commit 54d18d8

Browse files
authored
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
1 parent cea7a2a commit 54d18d8

File tree

7 files changed

+223
-222
lines changed

7 files changed

+223
-222
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"@std/semver": "jsr:@std/semver@1",
6666
"@std/streams": "jsr:@std/streams@1",
6767

68-
"@astral/astral": "jsr:@astral/astral@^0.4.6",
68+
"@astral/astral": "jsr:@astral/astral@^0.5.2",
6969
"@marvinh-test/fresh-island": "jsr:@marvinh-test/fresh-island@^0.0.1",
7070
"linkedom": "npm:linkedom@^0.16.11",
7171
"@std/async": "jsr:@std/async@1",

deno.lock

Lines changed: 176 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

init/src/init_test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Deno.test("init - can start dev server", async () => {
176176
await patchProject(dir);
177177
await withChildProcessServer(
178178
dir,
179-
path.join(dir, "dev.ts"),
179+
"dev",
180180
async (address) => {
181181
await withBrowser(async (page) => {
182182
await page.goto(address);
@@ -201,7 +201,7 @@ Deno.test("init - can start built project", async () => {
201201

202202
// Build
203203
await new Deno.Command(Deno.execPath(), {
204-
args: ["run", "-A", path.join(dir, "dev.ts"), "build"],
204+
args: ["task", "build"],
205205
stdin: "null",
206206
stdout: "piped",
207207
stderr: "piped",
@@ -210,7 +210,7 @@ Deno.test("init - can start built project", async () => {
210210

211211
await withChildProcessServer(
212212
dir,
213-
path.join(dir, "main.ts"),
213+
"start",
214214
async (address) => {
215215
await withBrowser(async (page) => {
216216
await page.goto(address);
@@ -234,7 +234,7 @@ Deno.test("init - errors on missing build cache in prod", async () => {
234234
await patchProject(dir);
235235

236236
const cp = await new Deno.Command(Deno.execPath(), {
237-
args: ["run", "-A", "main.ts"],
237+
args: ["task", "start"],
238238
stdin: "null",
239239
stdout: "piped",
240240
stderr: "piped",

tests/active_links_test.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ Deno.test({
9292
assertSelector(doc, "a[href='/'][data-ancestor]");
9393
assertSelector(doc, `a[href='/'][aria-current="true"]`);
9494
},
95-
sanitizeResources: false,
96-
sanitizeOps: false,
9795
});
9896

9997
Deno.test({
@@ -176,6 +174,4 @@ Deno.test({
176174
assertSelector(doc, `a[href='/'][aria-current="true"]`);
177175
});
178176
},
179-
sanitizeResources: false,
180-
sanitizeOps: false,
181177
});

0 commit comments

Comments
 (0)