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 /cli/js/mkdir_test.ts | |
parent | d9efb8c02a0036d755c35e8e9c88d58bd45a9e2b (diff) |
refactor: remove unneeded ErrorKinds (#3936)
Diffstat (limited to 'cli/js/mkdir_test.ts')
-rw-r--r-- | cli/js/mkdir_test.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/mkdir_test.ts b/cli/js/mkdir_test.ts index dad61c1a4..856cbdeb5 100644 --- a/cli/js/mkdir_test.ts +++ b/cli/js/mkdir_test.ts @@ -25,7 +25,7 @@ testPerm({ write: false }, function mkdirSyncPerm(): void { } catch (e) { err = e; } - assertEquals(err.kind, Deno.ErrorKind.PermissionDenied); + assert(err instanceof Deno.Err.PermissionDenied); assertEquals(err.name, "PermissionDenied"); }); @@ -45,8 +45,7 @@ testPerm({ write: true }, function mkdirErrIfExists(): void { } catch (e) { err = e; } - assertEquals(err.kind, Deno.ErrorKind.AlreadyExists); - assertEquals(err.name, "AlreadyExists"); + assert(err instanceof Deno.Err.AlreadyExists); }); testPerm({ read: true, write: true }, function mkdirSyncRecursive(): void { |