summaryrefslogtreecommitdiff
path: root/cli/js/remove_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/remove_test.ts')
-rw-r--r--cli/js/remove_test.ts44
1 files changed, 22 insertions, 22 deletions
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<void> {
} 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<void> {
} catch (e) {
err = e;
}
- assert(err instanceof Deno.Err.NotFound);
+ assert(err instanceof Deno.errors.NotFound);
});
testPerm({ write: false }, async function removeAllPerm(): Promise<void> {
@@ -457,6 +457,6 @@ testPerm({ write: false }, async function removeAllPerm(): Promise<void> {
} catch (e) {
err = e;
}
- assert(err instanceof Deno.Err.PermissionDenied);
+ assert(err instanceof Deno.errors.PermissionDenied);
assertEquals(err.name, "PermissionDenied");
});