chore: fix fetch body not consumed in test (#1782)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user