summaryrefslogtreecommitdiff
path: root/std/http/file_server_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/http/file_server_test.ts')
-rw-r--r--std/http/file_server_test.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts
index 404d133ae..dc14d2c57 100644
--- a/std/http/file_server_test.ts
+++ b/std/http/file_server_test.ts
@@ -79,7 +79,7 @@ test(async function serveFallback(): Promise<void> {
assert(res.headers.has("access-control-allow-origin"));
assert(res.headers.has("access-control-allow-headers"));
assertEquals(res.status, 404);
- res.body.close();
+ const _ = await res.text();
} finally {
killFileServer();
}
@@ -92,12 +92,12 @@ test(async function serveWithUnorthodoxFilename(): Promise<void> {
assert(res.headers.has("access-control-allow-origin"));
assert(res.headers.has("access-control-allow-headers"));
assertEquals(res.status, 200);
- res.body.close();
+ let _ = await res.text();
res = await fetch("http://localhost:4500/http/testdata/test%20file.txt");
assert(res.headers.has("access-control-allow-origin"));
assert(res.headers.has("access-control-allow-headers"));
assertEquals(res.status, 200);
- res.body.close();
+ _ = await res.text();
} finally {
killFileServer();
}
@@ -118,7 +118,7 @@ test(async function servePermissionDenied(): Promise<void> {
try {
const res = await fetch("http://localhost:4500/");
- res.body.close();
+ const _ = await res.text();
assertStrContains(
(await errReader.readLine()) as string,
"run again with the --allow-read flag"