diff options
Diffstat (limited to 'std/fs')
-rw-r--r-- | std/fs/copy_test.ts | 2 | ||||
-rw-r--r-- | std/fs/ensure_symlink_test.ts | 2 | ||||
-rw-r--r-- | std/fs/walk_test.ts | 6 |
3 files changed, 4 insertions, 6 deletions
diff --git a/std/fs/copy_test.ts b/std/fs/copy_test.ts index 5323ac9e4..1f3330226 100644 --- a/std/fs/copy_test.ts +++ b/std/fs/copy_test.ts @@ -15,7 +15,7 @@ import { ensureSymlink, ensureSymlinkSync } from "./ensure_symlink.ts"; const testdataDir = path.resolve("fs", "testdata"); // TODO(axetroy): Add test for Windows once symlink is implemented for Windows. -const isWindows = Deno.build.os === "win"; +const isWindows = Deno.build.os === "windows"; function testCopy(name: string, cb: (tempDir: string) => Promise<void>): void { Deno.test({ diff --git a/std/fs/ensure_symlink_test.ts b/std/fs/ensure_symlink_test.ts index 2264a6c37..5fda1c86a 100644 --- a/std/fs/ensure_symlink_test.ts +++ b/std/fs/ensure_symlink_test.ts @@ -9,7 +9,7 @@ import * as path from "../path/mod.ts"; import { ensureSymlink, ensureSymlinkSync } from "./ensure_symlink.ts"; const testdataDir = path.resolve("fs", "testdata"); -const isWindows = Deno.build.os === "win"; +const isWindows = Deno.build.os === "windows"; Deno.test("ensureSymlinkIfItNotExist", async function (): Promise<void> { const testDir = path.join(testdataDir, "link_file_1"); diff --git a/std/fs/walk_test.ts b/std/fs/walk_test.ts index b054db4cf..ea9a33773 100644 --- a/std/fs/walk_test.ts +++ b/std/fs/walk_test.ts @@ -3,8 +3,6 @@ const { remove } = Deno; import { walk, walkSync, WalkOptions, WalkEntry } from "./walk.ts"; import { assert, assertEquals, assertThrowsAsync } from "../testing/asserts.ts"; -const isWindows = Deno.build.os == "win"; - export function testWalk( setup: (arg0: string) => void | Promise<void>, t: () => void | Promise<void>, @@ -254,13 +252,13 @@ testWalk( try { await symlink(d + "/b", d + "/a/bb"); } catch (err) { - assert(isWindows); + assert(Deno.build.os == "windows"); assertEquals(err.message, "Not implemented"); } }, async function symlink(): Promise<void> { // symlink is not yet implemented on Windows. - if (isWindows) { + if (Deno.build.os == "windows") { return; } |