From e58462dbb9b8b611628c5d8da7e523e48a58242c Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Mon, 22 Jan 2024 07:58:24 +1100 Subject: chore: use `Deno.writeTextFile()` where appropriate (#22008) --- cli/tests/unit/command_test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cli/tests/unit/command_test.ts') diff --git a/cli/tests/unit/command_test.ts b/cli/tests/unit/command_test.ts index 1c707651c..cbb1c4921 100644 --- a/cli/tests/unit/command_test.ts +++ b/cli/tests/unit/command_test.ts @@ -208,8 +208,7 @@ Deno.test( async function commandRedirectStdin() { const tempDir = await Deno.makeTempDir(); const fileName = tempDir + "/redirected_stdio.txt"; - const encoder = new TextEncoder(); - await Deno.writeFile(fileName, encoder.encode("hello")); + await Deno.writeTextFile(fileName, "hello"); const file = await Deno.open(fileName); const command = new Deno.Command(Deno.execPath(), { -- cgit v1.2.3