diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-11 17:24:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 17:24:27 +0100 |
commit | 61273085e40fb4d992eef4b1b5601e3567c80664 (patch) | |
tree | 1ac0f401d4cb897bdb6f88e3a5c47fece2856f89 /std/fs/exists_test.ts | |
parent | e0bcecee6042b219c6626172851af5a25362b948 (diff) |
refactor: rewrite tests in std/ to use Deno.test (#3930)
Diffstat (limited to 'std/fs/exists_test.ts')
-rw-r--r-- | std/fs/exists_test.ts | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/std/fs/exists_test.ts b/std/fs/exists_test.ts index c7c7dc54e..06b908b9d 100644 --- a/std/fs/exists_test.ts +++ b/std/fs/exists_test.ts @@ -1,12 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { test } from "../testing/mod.ts"; import { assertEquals, assertStrContains } from "../testing/asserts.ts"; import * as path from "../path/mod.ts"; import { exists, existsSync } from "./exists.ts"; const testdataDir = path.resolve("fs", "testdata"); -test(async function existsFile(): Promise<void> { +Deno.test(async function existsFile(): Promise<void> { assertEquals( await exists(path.join(testdataDir, "not_exist_file.ts")), false @@ -14,12 +13,12 @@ test(async function existsFile(): Promise<void> { assertEquals(await existsSync(path.join(testdataDir, "0.ts")), true); }); -test(function existsFileSync(): void { +Deno.test(function existsFileSync(): void { assertEquals(existsSync(path.join(testdataDir, "not_exist_file.ts")), false); assertEquals(existsSync(path.join(testdataDir, "0.ts")), true); }); -test(async function existsDirectory(): Promise<void> { +Deno.test(async function existsDirectory(): Promise<void> { assertEquals( await exists(path.join(testdataDir, "not_exist_directory")), false @@ -27,7 +26,7 @@ test(async function existsDirectory(): Promise<void> { assertEquals(existsSync(testdataDir), true); }); -test(function existsDirectorySync(): void { +Deno.test(function existsDirectorySync(): void { assertEquals( existsSync(path.join(testdataDir, "not_exist_directory")), false @@ -35,19 +34,19 @@ test(function existsDirectorySync(): void { assertEquals(existsSync(testdataDir), true); }); -test(function existsLinkSync(): void { +Deno.test(function existsLinkSync(): void { // TODO(axetroy): generate link file use Deno api instead of set a link file // in repository assertEquals(existsSync(path.join(testdataDir, "0-link.ts")), true); }); -test(async function existsLink(): Promise<void> { +Deno.test(async function existsLink(): Promise<void> { // TODO(axetroy): generate link file use Deno api instead of set a link file // in repository assertEquals(await exists(path.join(testdataDir, "0-link.ts")), true); }); -test(async function existsPermission(): Promise<void> { +Deno.test(async function existsPermission(): Promise<void> { interface Scenes { read: boolean; // --allow-read async: boolean; |