summaryrefslogtreecommitdiff
path: root/cli/tests/unit_node/_fs/_fs_truncate_test.ts
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-01-22 07:58:24 +1100
committerGitHub <noreply@github.com>2024-01-21 21:58:24 +0100
commite58462dbb9b8b611628c5d8da7e523e48a58242c (patch)
tree61441d62da93b46565cfeeedfe22d977432daf4c /cli/tests/unit_node/_fs/_fs_truncate_test.ts
parent1b9f0cb452e672c187233de23cd74c7f8a3f773b (diff)
chore: use `Deno.writeTextFile()` where appropriate (#22008)
Diffstat (limited to 'cli/tests/unit_node/_fs/_fs_truncate_test.ts')
-rw-r--r--cli/tests/unit_node/_fs/_fs_truncate_test.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tests/unit_node/_fs/_fs_truncate_test.ts b/cli/tests/unit_node/_fs/_fs_truncate_test.ts
index 00e03ab0e..ff087095b 100644
--- a/cli/tests/unit_node/_fs/_fs_truncate_test.ts
+++ b/cli/tests/unit_node/_fs/_fs_truncate_test.ts
@@ -24,7 +24,7 @@ Deno.test({
name: "ASYNC: truncate entire file contents",
async fn() {
const file: string = Deno.makeTempFileSync();
- await Deno.writeFile(file, new TextEncoder().encode("hello world"));
+ await Deno.writeTextFile(file, "hello world");
await new Promise<void>((resolve, reject) => {
truncate(file, (err: Error | null) => {
@@ -49,7 +49,7 @@ Deno.test({
name: "ASYNC: truncate file to a size of precisely len bytes",
async fn() {
const file: string = Deno.makeTempFileSync();
- await Deno.writeFile(file, new TextEncoder().encode("hello world"));
+ await Deno.writeTextFile(file, "hello world");
await new Promise<void>((resolve, reject) => {
truncate(file, 3, (err: Error | null) => {