diff options
author | Nayeem Rahman <muhammed.9939@gmail.com> | 2020-03-15 12:03:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-15 13:03:25 +0100 |
commit | 6471d4cfabf27c0f5e7b340568aa88712d270541 (patch) | |
tree | 29ca29b6baeb4715a0b7eeb24aeaf8b0ed112e97 /std/fs | |
parent | 2f4be6e9441c7d5b0afd0d37dccd48d3057bcd3f (diff) |
refactor(std): Uncomment disabled tests, use skip option (#4378)
Diffstat (limited to 'std/fs')
-rw-r--r-- | std/fs/walk_test.ts | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/std/fs/walk_test.ts b/std/fs/walk_test.ts index caf806262..91cfd57c8 100644 --- a/std/fs/walk_test.ts +++ b/std/fs/walk_test.ts @@ -1,11 +1,14 @@ -const { cwd, chdir, makeTempDir, mkdir, open } = Deno; +const { cwd, chdir, makeTempDir, mkdir, open, symlink } = Deno; const { remove } = Deno; import { walk, walkSync, WalkOptions, WalkInfo } from "./walk.ts"; -import { assertEquals, assertThrowsAsync } from "../testing/asserts.ts"; +import { assert, assertEquals, assertThrowsAsync } from "../testing/asserts.ts"; + +const isWindows = Deno.build.os == "win"; export async function testWalk( setup: (arg0: string) => void | Promise<void>, - t: Deno.TestFunction + t: Deno.TestFunction, + skip = false ): Promise<void> { const name = t.name; async function fn(): Promise<void> { @@ -20,7 +23,7 @@ export async function testWalk( remove(d, { recursive: true }); } } - Deno.test({ name, fn }); + Deno.test({ skip, name: `[walk] ${name}`, fn }); } function normalize({ filename }: WalkInfo): string { @@ -239,7 +242,7 @@ testWalk( } ); -/* TODO(ry) Re-enable followSymlinks +// TODO(ry) Re-enable followSymlinks testWalk( async (d: string): Promise<void> => { await mkdir(d + "/a"); @@ -268,6 +271,6 @@ testWalk( const arr = await walkArray("a", { followSymlinks: true }); assertEquals(arr.length, 3); assert(arr.some((f): boolean => f.endsWith("/b/z"))); - } + }, + true ); -*/ |