summaryrefslogtreecommitdiff
path: root/cli/tests/unit/chmod_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/chmod_test.ts')
-rw-r--r--cli/tests/unit/chmod_test.ts24
1 files changed, 16 insertions, 8 deletions
diff --git a/cli/tests/unit/chmod_test.ts b/cli/tests/unit/chmod_test.ts
index 8d73a3ba4..2ab4c5b0c 100644
--- a/cli/tests/unit/chmod_test.ts
+++ b/cli/tests/unit/chmod_test.ts
@@ -82,10 +82,14 @@ unitTest(
);
unitTest({ permissions: { write: true } }, function chmodSyncFailure() {
- assertThrows(() => {
- const filename = "/badfile.txt";
- Deno.chmodSync(filename, 0o777);
- }, Deno.errors.NotFound);
+ const filename = "/badfile.txt";
+ assertThrows(
+ () => {
+ Deno.chmodSync(filename, 0o777);
+ },
+ Deno.errors.NotFound,
+ `chmod '${filename}'`,
+ );
});
unitTest({ permissions: { write: false } }, function chmodSyncPerm() {
@@ -170,10 +174,14 @@ unitTest(
);
unitTest({ permissions: { write: true } }, async function chmodFailure() {
- await assertRejects(async () => {
- const filename = "/badfile.txt";
- await Deno.chmod(filename, 0o777);
- }, Deno.errors.NotFound);
+ const filename = "/badfile.txt";
+ await assertRejects(
+ async () => {
+ await Deno.chmod(filename, 0o777);
+ },
+ Deno.errors.NotFound,
+ `chmod '${filename}'`,
+ );
});
unitTest({ permissions: { write: false } }, async function chmodPerm() {