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/chmod_test.ts | |
parent | d9efb8c02a0036d755c35e8e9c88d58bd45a9e2b (diff) |
refactor: remove unneeded ErrorKinds (#3936)
Diffstat (limited to 'cli/js/chmod_test.ts')
-rw-r--r-- | cli/js/chmod_test.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cli/js/chmod_test.ts b/cli/js/chmod_test.ts index b3b0a2ae2..24c69db7a 100644 --- a/cli/js/chmod_test.ts +++ b/cli/js/chmod_test.ts @@ -60,8 +60,7 @@ testPerm({ write: true }, function chmodSyncFailure(): void { } catch (e) { err = e; } - assertEquals(err.kind, Deno.ErrorKind.NotFound); - assertEquals(err.name, "NotFound"); + assert(err instanceof Deno.Err.NotFound); }); testPerm({ write: false }, function chmodSyncPerm(): void { @@ -71,7 +70,7 @@ testPerm({ write: false }, function chmodSyncPerm(): void { } catch (e) { err = e; } - assertEquals(err.kind, Deno.ErrorKind.PermissionDenied); + assert(err instanceof Deno.Err.PermissionDenied); assertEquals(err.name, "PermissionDenied"); }); @@ -134,8 +133,7 @@ testPerm({ write: true }, async function chmodFailure(): Promise<void> { } catch (e) { err = e; } - assertEquals(err.kind, Deno.ErrorKind.NotFound); - assertEquals(err.name, "NotFound"); + assert(err instanceof Deno.Err.NotFound); }); testPerm({ write: false }, async function chmodPerm(): Promise<void> { @@ -145,6 +143,6 @@ testPerm({ write: false }, async function chmodPerm(): Promise<void> { } catch (e) { err = e; } - assertEquals(err.kind, Deno.ErrorKind.PermissionDenied); + assert(err instanceof Deno.Err.PermissionDenied); assertEquals(err.name, "PermissionDenied"); }); |