summaryrefslogtreecommitdiff
path: root/cli/tests/unit/truncate_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/truncate_test.ts')
-rw-r--r--cli/tests/unit/truncate_test.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tests/unit/truncate_test.ts b/cli/tests/unit/truncate_test.ts
index 89ca12634..19a44dba9 100644
--- a/cli/tests/unit/truncate_test.ts
+++ b/cli/tests/unit/truncate_test.ts
@@ -7,7 +7,7 @@ import {
} from "./test_util.ts";
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
function ftruncateSyncSuccess() {
const filename = Deno.makeTempDirSync() + "/test_ftruncateSync.txt";
const file = Deno.openSync(filename, {
@@ -29,7 +29,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
async function ftruncateSuccess() {
const filename = Deno.makeTempDirSync() + "/test_ftruncate.txt";
const file = await Deno.open(filename, {
@@ -51,7 +51,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
function truncateSyncSuccess() {
const filename = Deno.makeTempDirSync() + "/test_truncateSync.txt";
Deno.writeFileSync(filename, new Uint8Array(5));
@@ -66,7 +66,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
async function truncateSuccess() {
const filename = Deno.makeTempDirSync() + "/test_truncate.txt";
await Deno.writeFile(filename, new Uint8Array(5));
@@ -80,13 +80,13 @@ unitTest(
},
);
-unitTest({ perms: { write: false } }, function truncateSyncPerm() {
+unitTest({ permissions: { write: false } }, function truncateSyncPerm() {
assertThrows(() => {
Deno.truncateSync("/test_truncateSyncPermission.txt");
}, Deno.errors.PermissionDenied);
});
-unitTest({ perms: { write: false } }, async function truncatePerm() {
+unitTest({ permissions: { write: false } }, async function truncatePerm() {
await assertRejects(async () => {
await Deno.truncate("/test_truncatePermission.txt");
}, Deno.errors.PermissionDenied);