summaryrefslogtreecommitdiff
path: root/tests/unit/symlink_test.ts
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2024-09-10 20:12:24 +0200
committerGitHub <noreply@github.com>2024-09-10 11:12:24 -0700
commit7bfcb4dd10d31f5f9566c90a28449c0951f3a48e (patch)
treefca0dec6e98118418f1712c6e8451a04c7e89988 /tests/unit/symlink_test.ts
parentbe5419d479fcae16c8a07dec00ce11b532b7996a (diff)
feat(cli): use NotCapable error for permission errors (#25431)
Closes #7394 --------- Co-authored-by: snek <snek@deno.com>
Diffstat (limited to 'tests/unit/symlink_test.ts')
-rw-r--r--tests/unit/symlink_test.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/symlink_test.ts b/tests/unit/symlink_test.ts
index 0ee4a36fd..47a685ec6 100644
--- a/tests/unit/symlink_test.ts
+++ b/tests/unit/symlink_test.ts
@@ -62,7 +62,7 @@ Deno.test(
function symlinkSyncPerm() {
assertThrows(() => {
Deno.symlinkSync("oldbaddir", "newbaddir");
- }, Deno.errors.PermissionDenied);
+ }, Deno.errors.NotCapable);
},
);
@@ -152,11 +152,11 @@ Deno.test(
async function symlinkNoFullWritePermissions() {
await assertRejects(
() => Deno.symlink("old", "new"),
- Deno.errors.PermissionDenied,
+ Deno.errors.NotCapable,
);
assertThrows(
() => Deno.symlinkSync("old", "new"),
- Deno.errors.PermissionDenied,
+ Deno.errors.NotCapable,
);
},
);
@@ -166,11 +166,11 @@ Deno.test(
async function symlinkNoFullReadPermissions() {
await assertRejects(
() => Deno.symlink("old", "new"),
- Deno.errors.PermissionDenied,
+ Deno.errors.NotCapable,
);
assertThrows(
() => Deno.symlinkSync("old", "new"),
- Deno.errors.PermissionDenied,
+ Deno.errors.NotCapable,
);
},
);