summaryrefslogtreecommitdiff
path: root/std/http/file_server_test.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-04-03 12:11:52 -0400
committerGitHub <noreply@github.com>2020-04-03 12:11:52 -0400
commit13db64fbc6a8da68e5f6c1da59e058a1a3146054 (patch)
treeb8f91e48196ed3c230162da8972f0560d3420050 /std/http/file_server_test.ts
parente99374a0a304bc3bd11ee55274fb7f4bcf902da6 (diff)
Remove /std/media_types (#4594)
Diffstat (limited to 'std/http/file_server_test.ts')
-rw-r--r--std/http/file_server_test.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts
index 3cb59e67f..404d133ae 100644
--- a/std/http/file_server_test.ts
+++ b/std/http/file_server_test.ts
@@ -39,8 +39,7 @@ test("file_server serveFile", async (): Promise<void> => {
const res = await fetch("http://localhost:4500/README.md");
assert(res.headers.has("access-control-allow-origin"));
assert(res.headers.has("access-control-allow-headers"));
- assert(res.headers.has("content-type"));
- assert(res.headers.get("content-type")!.includes("charset=utf-8"));
+ assertEquals(res.headers.get("content-type"), "text/markdown");
const downloadedFile = await res.text();
const localFile = new TextDecoder().decode(
await Deno.readFile("README.md")
@@ -148,6 +147,6 @@ test("contentType", async () => {
const request = new ServerRequest();
const response = await serveFile(request, "http/testdata/hello.html");
const contentType = response.headers!.get("content-type");
- assertEquals(contentType, "text/html; charset=utf-8");
+ assertEquals(contentType, "text/html");
(response.body as Deno.File).close();
});