diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-21 10:36:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-21 10:36:13 -0500 |
commit | dd8a10948195f231a6a9eb652e3f208813904ad6 (patch) | |
tree | f9a4afeb67bbead882c29c2458a5f1f99e2e42db /std/fs/walk_test.ts | |
parent | d9efb8c02a0036d755c35e8e9c88d58bd45a9e2b (diff) |
refactor: remove unneeded ErrorKinds (#3936)
Diffstat (limited to 'std/fs/walk_test.ts')
-rw-r--r-- | std/fs/walk_test.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/std/fs/walk_test.ts b/std/fs/walk_test.ts index 4984546f2..f99f82eb5 100644 --- a/std/fs/walk_test.ts +++ b/std/fs/walk_test.ts @@ -1,7 +1,5 @@ -const { DenoError, ErrorKind, cwd, chdir, makeTempDir, mkdir, open } = Deno; +const { cwd, chdir, makeTempDir, mkdir, open } = Deno; const { remove } = Deno; -type ErrorKind = Deno.ErrorKind; -type DenoError = Deno.DenoError<ErrorKind>; import { walk, walkSync, WalkOptions, WalkInfo } from "./walk.ts"; import { assertEquals, assertThrowsAsync } from "../testing/asserts.ts"; @@ -235,10 +233,9 @@ testWalk( testWalk( async (_d: string): Promise<void> => {}, async function nonexistentRoot(): Promise<void> { - const error = (await assertThrowsAsync(async () => { + await assertThrowsAsync(async () => { await walkArray("nonexistent"); - }, DenoError)) as DenoError; - assertEquals(error.kind, ErrorKind.NotFound); + }, Deno.Err.NotFound); } ); |