diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-12 20:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 15:23:38 -0400 |
commit | 1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch) | |
tree | 12074b6d44736b11513d857e437f9e30a6bf65a4 /std/node/_fs/_fs_appendFile_test.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/node/_fs/_fs_appendFile_test.ts')
-rw-r--r-- | std/node/_fs/_fs_appendFile_test.ts | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/std/node/_fs/_fs_appendFile_test.ts b/std/node/_fs/_fs_appendFile_test.ts index 402ac1c10..1286ff900 100644 --- a/std/node/_fs/_fs_appendFile_test.ts +++ b/std/node/_fs/_fs_appendFile_test.ts @@ -1,12 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -const { test } = Deno; import { assertEquals, assertThrows, fail } from "../../testing/asserts.ts"; import { appendFile, appendFileSync } from "./_fs_appendFile.ts"; import { fromFileUrl } from "../path.ts"; const decoder = new TextDecoder("utf-8"); -test({ +Deno.test({ name: "No callback Fn results in Error", fn() { assertThrows( @@ -19,7 +18,7 @@ test({ }, }); -test({ +Deno.test({ name: "Unsupported encoding results in error()", fn() { assertThrows( @@ -57,7 +56,7 @@ test({ }, }); -test({ +Deno.test({ name: "Async: Data is written to passed in rid", async fn() { const tempFile: string = await Deno.makeTempFile(); @@ -86,7 +85,7 @@ test({ }, }); -test({ +Deno.test({ name: "Async: Data is written to passed in file path", async fn() { const openResourcesBeforeAppend: Deno.ResourceMap = Deno.resources(); @@ -110,7 +109,7 @@ test({ }, }); -test({ +Deno.test({ name: "Async: Data is written to passed in URL", async fn() { const openResourcesBeforeAppend: Deno.ResourceMap = Deno.resources(); @@ -135,7 +134,7 @@ test({ }, }); -test({ +Deno.test({ name: "Async: Callback is made with error if attempting to append data to an existing file with 'ax' flag", async fn() { @@ -159,7 +158,7 @@ test({ }, }); -test({ +Deno.test({ name: "Sync: Data is written to passed in rid", fn() { const tempFile: string = Deno.makeTempFileSync(); @@ -176,7 +175,7 @@ test({ }, }); -test({ +Deno.test({ name: "Sync: Data is written to passed in file path", fn() { const openResourcesBeforeAppend: Deno.ResourceMap = Deno.resources(); @@ -188,7 +187,7 @@ test({ }, }); -test({ +Deno.test({ name: "Sync: error thrown if attempting to append data to an existing file with 'ax' flag", fn() { |