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.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts
index 7d7e024e7..f725b32a2 100644
--- a/std/http/file_server_test.ts
+++ b/std/http/file_server_test.ts
@@ -79,3 +79,17 @@ test(async function serveFallback(): Promise<void> {
killFileServer();
}
});
+
+test(async function serveFallback(): Promise<void> {
+ await startFileServer();
+ try {
+ const 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);
+ } finally {
+ killFileServer();
+ }
+});