From 1fff6f55c3ba98a10018c6d374795e612061e9b6 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 12 Jun 2020 20:23:38 +0100 Subject: refactor: Don't destructure the Deno namespace (#6268) --- std/node/_fs/_fs_dir_test.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'std/node/_fs/_fs_dir_test.ts') 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(); -- cgit v1.2.3