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_dir_test.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/node/_fs/_fs_dir_test.ts')
-rw-r--r-- | std/node/_fs/_fs_dir_test.ts | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/std/node/_fs/_fs_dir_test.ts b/std/node/_fs/_fs_dir_test.ts index 5b3336201..e89912772 100644 --- a/std/node/_fs/_fs_dir_test.ts +++ b/std/node/_fs/_fs_dir_test.ts @@ -1,9 +1,8 @@ -const { test } = Deno; import { assert, assertEquals, fail } from "../../testing/asserts.ts"; import Dir from "./_fs_dir.ts"; import Dirent from "./_fs_dirent.ts"; -test({ +Deno.test({ name: "Closing current directory with callback is successful", fn() { let calledBack = false; @@ -16,21 +15,21 @@ test({ }, }); -test({ +Deno.test({ name: "Closing current directory without callback returns void Promise", async fn() { await new Dir(".").close(); }, }); -test({ +Deno.test({ name: "Closing current directory synchronously works", fn() { new Dir(".").closeSync(); }, }); -test({ +Deno.test({ name: "Path is correctly returned", fn() { assertEquals(new Dir("std/node").path, "std/node"); @@ -40,7 +39,7 @@ test({ }, }); -test({ +Deno.test({ name: "read returns null for empty directory", async fn() { const testDir: string = Deno.makeTempDirSync(); @@ -67,7 +66,7 @@ test({ }, }); -test({ +Deno.test({ name: "Async read returns one file at a time", async fn() { const testDir: string = Deno.makeTempDirSync(); @@ -108,7 +107,7 @@ test({ }, }); -test({ +Deno.test({ name: "Sync read returns one file at a time", fn() { const testDir: string = Deno.makeTempDirSync(); @@ -139,7 +138,7 @@ test({ }, }); -test({ +Deno.test({ name: "Async iteration over existing directory", async fn() { const testDir: string = Deno.makeTempDirSync(); |