diff --git a/tests/main_test.ts b/tests/main_test.ts index 43a1f934..8e2e6932 100644 --- a/tests/main_test.ts +++ b/tests/main_test.ts @@ -863,6 +863,7 @@ Deno.test("PORT environment variable", { await delay(100); const resp = await fetch("http://localhost:" + PORT); + await resp.body?.cancel(); assert(resp); assertEquals(resp.status, Status.OK); diff --git a/tests/route_groups_test.ts b/tests/route_groups_test.ts index b2b29a1e..21999b34 100644 --- a/tests/route_groups_test.ts +++ b/tests/route_groups_test.ts @@ -57,7 +57,7 @@ Deno.test("does not treat files in (_islands) as routes", async () => { async (address) => { const res = await fetch(`${address}/route-groups-islands/invalid`); assertEquals(res.status, 404); - res.body?.cancel(); + await res.body?.cancel(); }, ); }); @@ -68,7 +68,7 @@ Deno.test("does not treat files in (_...) as routes", async () => { async (address) => { const res = await fetch(`${address}/route-groups-islands/sub`); assertEquals(res.status, 404); - res.body?.cancel(); + await res.body?.cancel(); }, ); });