From cc30b4ae86dc28dfad854b772ef730dead1bed42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szalay=20Krist=C3=B3f?= <32012862+littletof@users.noreply.github.com> Date: Thu, 28 May 2020 23:08:47 +0200 Subject: [PATCH] fix: Fix FileHandler test with mode 'x' on non-English systems (denoland/deno#5757) --- log/handlers_test.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/log/handlers_test.ts b/log/handlers_test.ts index b69ef6eabd0c..c8b76347fe26 100644 --- a/log/handlers_test.ts +++ b/log/handlers_test.ts @@ -115,18 +115,14 @@ test({ test({ name: "FileHandler with mode 'x' will throw if log file already exists", async fn() { - await assertThrowsAsync( - async () => { - Deno.writeFileSync(LOG_FILE, new TextEncoder().encode("hello world")); - const fileHandler = new FileHandler("WARNING", { - filename: LOG_FILE, - mode: "x", - }); - await fileHandler.setup(); - }, - Deno.errors.AlreadyExists, - "ile exists" - ); + await assertThrowsAsync(async () => { + Deno.writeFileSync(LOG_FILE, new TextEncoder().encode("hello world")); + const fileHandler = new FileHandler("WARNING", { + filename: LOG_FILE, + mode: "x", + }); + await fileHandler.setup(); + }, Deno.errors.AlreadyExists); Deno.removeSync(LOG_FILE); }, });