From c876d1adb40a79e7a052ae0ae1b1956a4a0866ea Mon Sep 17 00:00:00 2001 From: Nick Stott Date: Sat, 19 Oct 2019 16:55:20 -0400 Subject: Re-enable some tests (#3154) Ref #3095 --- std/http/file_server_test.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'std') diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts index 958c66529..16540bffa 100644 --- a/std/http/file_server_test.ts +++ b/std/http/file_server_test.ts @@ -30,17 +30,19 @@ function killFileServer(): void { fileServer.stdout!.close(); } -/* TODO(ry) re-enable tests test(async function serveFile(): Promise { await startFileServer(); try { - const res = await fetch("http://localhost:4500/azure-pipelines.yml"); + const res = await fetch("http://localhost:4500/tsconfig.json"); assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); - assertEquals(res.headers.get("content-type"), "text/yaml; charset=utf-8"); + assertEquals( + res.headers.get("content-type"), + "application/json; charset=utf-8" + ); const downloadedFile = await res.text(); const localFile = new TextDecoder().decode( - await Deno.readFile("./azure-pipelines.yml") + await Deno.readFile("./tsconfig.json") ); assertEquals(downloadedFile, localFile); } finally { @@ -55,7 +57,7 @@ test(async function serveDirectory(): Promise { assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); const page = await res.text(); - assert(page.includes("azure-pipelines.yml")); + assert(page.includes("tsconfig.json")); // `Deno.FileInfo` is not completely compatible with Windows yet // TODO: `mode` should work correctly in the future. @@ -65,15 +67,12 @@ test(async function serveDirectory(): Promise { Deno.build.os === "win" && assert(/\(unknown mode\)<\/td>/.test(page)); assert( - page.includes( - `azure-pipelines.yml` - ) + page.includes(`tsconfig.json`) ); } finally { killFileServer(); } }); -*/ test(async function serveFallback(): Promise { await startFileServer(); -- cgit v1.2.3