summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzalay Kristóf <32012862+littletof@users.noreply.github.com>2020-05-28 23:08:47 +0200
committerGitHub <noreply@github.com>2020-05-28 23:08:47 +0200
commitc9f7558cd1afa11767f84a301d048191ebee867d (patch)
tree2d52a9bbd4e5746d25538a69bbc38b4c0e91c478
parent8f08b3f73ddb7528f828e6b022279024f5f5cef9 (diff)
fix(std): Fix FileHandler test with mode 'x' on non-English systems (#5757)
-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);
},
});