summaryrefslogtreecommitdiff
path: root/tests/unit/stat_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/stat_test.ts')
-rw-r--r--tests/unit/stat_test.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/stat_test.ts b/tests/unit/stat_test.ts
index 950ffa81b..59831a069 100644
--- a/tests/unit/stat_test.ts
+++ b/tests/unit/stat_test.ts
@@ -74,7 +74,7 @@ Deno.test(
Deno.test({ permissions: { read: false } }, function statSyncPerm() {
assertThrows(() => {
Deno.statSync("README.md");
- }, Deno.errors.PermissionDenied);
+ }, Deno.errors.NotCapable);
});
Deno.test({ permissions: { read: true } }, function statSyncNotFound() {
@@ -118,7 +118,7 @@ Deno.test({ permissions: { read: true } }, function lstatSyncSuccess() {
Deno.test({ permissions: { read: false } }, function lstatSyncPerm() {
assertThrows(() => {
Deno.lstatSync("assets/hello.txt");
- }, Deno.errors.PermissionDenied);
+ }, Deno.errors.NotCapable);
});
Deno.test({ permissions: { read: true } }, function lstatSyncNotFound() {
@@ -200,7 +200,7 @@ Deno.test(
Deno.test({ permissions: { read: false } }, async function statPerm() {
await assertRejects(async () => {
await Deno.stat("README.md");
- }, Deno.errors.PermissionDenied);
+ }, Deno.errors.NotCapable);
});
Deno.test({ permissions: { read: true } }, async function statNotFound() {
@@ -244,7 +244,7 @@ Deno.test({ permissions: { read: true } }, async function lstatSuccess() {
Deno.test({ permissions: { read: false } }, async function lstatPerm() {
await assertRejects(async () => {
await Deno.lstat("README.md");
- }, Deno.errors.PermissionDenied);
+ }, Deno.errors.NotCapable);
});
Deno.test({ permissions: { read: true } }, async function lstatNotFound() {