mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 13:44:47 +00:00
Add content-type header to file_server (denoland/deno_std#47)
Original: ab27371a01
This commit is contained in:
parent
95e378a28b
commit
b65727734e
3 changed files with 93 additions and 0 deletions
|
@ -25,6 +25,7 @@ export function runTests(serverReadyPromise: Promise<any>) {
|
|||
const res = await fetch("http://localhost:4500/.travis.yml");
|
||||
assert(res.headers.has("access-control-allow-origin"));
|
||||
assert(res.headers.has("access-control-allow-headers"));
|
||||
assertEqual(res.headers.get("content-type"), "text/yaml");
|
||||
const downloadedFile = await res.text();
|
||||
const localFile = new TextDecoder().decode(await readFile("./.travis.yml"));
|
||||
assertEqual(downloadedFile, localFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue