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); }, });