From cb76563e8ea1628f81820d1dff20bbd7acc81478 Mon Sep 17 00:00:00 2001 From: Yuqing CHEN Date: Wed, 22 May 2019 15:37:35 +0800 Subject: [PATCH] fix win test failure --- http/file_server_test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/http/file_server_test.ts b/http/file_server_test.ts index 9de39e1b131f..578b0e6241e7 100644 --- a/http/file_server_test.ts +++ b/http/file_server_test.ts @@ -56,8 +56,13 @@ test(async function serveDirectory(): Promise { assert(res.headers.has("access-control-allow-headers")); const page = await res.text(); assert(page.includes("azure-pipelines.yml")); - // assert(/\([a-zA-Z-]{10}\)<\/td>/.test(page)); - assert(/\(unknown mode\)<\/td>/.test(page)); + + // `Deno.FileInfo` is not completely compatible with Windows yet + // TODO: `mode` should work correctly in the future. Correct this test case accordingly. + Deno.platform.os !== "win" && + assert(/\([a-zA-Z-]{10}\)<\/td>/.test(page)); + Deno.platform.os === "win" && + assert(/\(unknown mode\)<\/td>/.test(page)); assert( page.includes( `azure-pipelines.yml`