summaryrefslogtreecommitdiff
path: root/std/log/handlers_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/log/handlers_test.ts')
-rw-r--r--std/log/handlers_test.ts20
1 files changed, 8 insertions, 12 deletions
diff --git a/std/log/handlers_test.ts b/std/log/handlers_test.ts
index b69ef6eab..c8b76347f 100644
--- a/std/log/handlers_test.ts
+++ b/std/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);
},
});