From e1687c0a4616e90d4bbde42b13a0356a7f6a1e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 24 Feb 2020 15:48:35 -0500 Subject: rename Deno.Err -> Deno.errors (#4093) --- cli/js/remove_test.ts | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'cli/js/remove_test.ts') diff --git a/cli/js/remove_test.ts b/cli/js/remove_test.ts index cb89ea1a9..e7d07ebcc 100644 --- a/cli/js/remove_test.ts +++ b/cli/js/remove_test.ts @@ -18,7 +18,7 @@ testPerm({ write: true, read: true }, function removeSyncDirSuccess(): void { err = e; } // Directory is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); }); testPerm({ write: true, read: true }, function removeSyncFileSuccess(): void { @@ -38,7 +38,7 @@ testPerm({ write: true, read: true }, function removeSyncFileSuccess(): void { err = e; } // File is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); }); testPerm({ write: true, read: true }, function removeSyncFail(): void { @@ -67,7 +67,7 @@ testPerm({ write: true, read: true }, function removeSyncFail(): void { } catch (e) { err = e; } - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); }); testPerm( @@ -93,7 +93,7 @@ testPerm( } catch (e) { err = e; } - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); } } ); @@ -127,7 +127,7 @@ testPerm( err = e; } Deno.removeSync(filePath); - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); } } ); @@ -139,7 +139,7 @@ testPerm({ write: false }, function removeSyncPerm(): void { } catch (e) { err = e; } - assert(err instanceof Deno.Err.PermissionDenied); + assert(err instanceof Deno.errors.PermissionDenied); assertEquals(err.name, "PermissionDenied"); }); @@ -158,7 +158,7 @@ testPerm({ write: true, read: true }, function removeAllSyncDirSuccess(): void { err = e; } // Directory is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); // REMOVE NON-EMPTY DIRECTORY path = Deno.makeTempDirSync() + "/dir/subdir"; @@ -177,7 +177,7 @@ testPerm({ write: true, read: true }, function removeAllSyncDirSuccess(): void { err = e; } // Directory is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); }); testPerm( @@ -199,7 +199,7 @@ testPerm( err = e; } // File is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); } ); @@ -212,7 +212,7 @@ testPerm({ write: true }, function removeAllSyncFail(): void { } catch (e) { err = e; } - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); }); testPerm({ write: false }, function removeAllSyncPerm(): void { @@ -222,7 +222,7 @@ testPerm({ write: false }, function removeAllSyncPerm(): void { } catch (e) { err = e; } - assert(err instanceof Deno.Err.PermissionDenied); + assert(err instanceof Deno.errors.PermissionDenied); assertEquals(err.name, "PermissionDenied"); }); @@ -245,7 +245,7 @@ testPerm( err = e; } // Directory is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); } ); @@ -268,7 +268,7 @@ testPerm( err = e; } // File is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); } ); @@ -299,7 +299,7 @@ testPerm({ write: true, read: true }, async function removeFail(): Promise< } catch (e) { err = e; } - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); }); testPerm( @@ -325,7 +325,7 @@ testPerm( } catch (e) { err = e; } - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); } } ); @@ -359,7 +359,7 @@ testPerm( err = e; } Deno.removeSync(filePath); - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); } } ); @@ -371,7 +371,7 @@ testPerm({ write: false }, async function removePerm(): Promise { } catch (e) { err = e; } - assert(err instanceof Deno.Err.PermissionDenied); + assert(err instanceof Deno.errors.PermissionDenied); assertEquals(err.name, "PermissionDenied"); }); @@ -392,7 +392,7 @@ testPerm( err = e; } // Directory is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); // REMOVE NON-EMPTY DIRECTORY path = Deno.makeTempDirSync() + "/dir/subdir"; @@ -411,7 +411,7 @@ testPerm( err = e; } // Directory is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); } ); @@ -434,7 +434,7 @@ testPerm( err = e; } // File is gone - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); } ); @@ -447,7 +447,7 @@ testPerm({ write: true }, async function removeAllFail(): Promise { } catch (e) { err = e; } - assert(err instanceof Deno.Err.NotFound); + assert(err instanceof Deno.errors.NotFound); }); testPerm({ write: false }, async function removeAllPerm(): Promise { @@ -457,6 +457,6 @@ testPerm({ write: false }, async function removeAllPerm(): Promise { } catch (e) { err = e; } - assert(err instanceof Deno.Err.PermissionDenied); + assert(err instanceof Deno.errors.PermissionDenied); assertEquals(err.name, "PermissionDenied"); }); -- cgit v1.2.3