chore: fix fetch body not consumed in test (#1782)

This commit is contained in:
Marvin Hagemeister
2023-09-15 13:34:22 +02:00
committed by GitHub
parent 32ee75dee5
commit f1148042ee
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -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);
+2 -2
View File
@@ -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();
},
);
});