summaryrefslogtreecommitdiff
path: root/cli/tests/unit/real_path_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/real_path_test.ts')
-rw-r--r--cli/tests/unit/real_path_test.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/cli/tests/unit/real_path_test.ts b/cli/tests/unit/real_path_test.ts
index 542d06996..ee4ad23ec 100644
--- a/cli/tests/unit/real_path_test.ts
+++ b/cli/tests/unit/real_path_test.ts
@@ -9,7 +9,7 @@ import {
unitTest,
} from "./test_util.ts";
-unitTest({ perms: { read: true } }, function realPathSyncSuccess() {
+unitTest({ permissions: { read: true } }, function realPathSyncSuccess() {
const relative = "cli/tests/testdata/fixture.json";
const realPath = Deno.realPathSync(relative);
if (Deno.build.os !== "windows") {
@@ -21,7 +21,7 @@ unitTest({ perms: { read: true } }, function realPathSyncSuccess() {
}
});
-unitTest({ perms: { read: true } }, function realPathSyncUrl() {
+unitTest({ permissions: { read: true } }, function realPathSyncUrl() {
const relative = "cli/tests/testdata/fixture.json";
const url = pathToAbsoluteFileUrl(relative);
assertEquals(Deno.realPathSync(relative), Deno.realPathSync(url));
@@ -29,7 +29,7 @@ unitTest({ perms: { read: true } }, function realPathSyncUrl() {
unitTest(
{
- perms: { read: true, write: true },
+ permissions: { read: true, write: true },
},
function realPathSyncSymlink() {
const testDir = Deno.makeTempDirSync();
@@ -48,19 +48,19 @@ unitTest(
},
);
-unitTest({ perms: { read: false } }, function realPathSyncPerm() {
+unitTest({ permissions: { read: false } }, function realPathSyncPerm() {
assertThrows(() => {
Deno.realPathSync("some_file");
}, Deno.errors.PermissionDenied);
});
-unitTest({ perms: { read: true } }, function realPathSyncNotFound() {
+unitTest({ permissions: { read: true } }, function realPathSyncNotFound() {
assertThrows(() => {
Deno.realPathSync("bad_filename");
}, Deno.errors.NotFound);
});
-unitTest({ perms: { read: true } }, async function realPathSuccess() {
+unitTest({ permissions: { read: true } }, async function realPathSuccess() {
const relativePath = "cli/tests/testdata/fixture.json";
const realPath = await Deno.realPath(relativePath);
if (Deno.build.os !== "windows") {
@@ -73,7 +73,7 @@ unitTest({ perms: { read: true } }, async function realPathSuccess() {
});
unitTest(
- { perms: { read: true } },
+ { permissions: { read: true } },
async function realPathUrl() {
const relative = "cli/tests/testdata/fixture.json";
const url = pathToAbsoluteFileUrl(relative);
@@ -83,7 +83,7 @@ unitTest(
unitTest(
{
- perms: { read: true, write: true },
+ permissions: { read: true, write: true },
},
async function realPathSymlink() {
const testDir = Deno.makeTempDirSync();
@@ -102,13 +102,13 @@ unitTest(
},
);
-unitTest({ perms: { read: false } }, async function realPathPerm() {
+unitTest({ permissions: { read: false } }, async function realPathPerm() {
await assertRejects(async () => {
await Deno.realPath("some_file");
}, Deno.errors.PermissionDenied);
});
-unitTest({ perms: { read: true } }, async function realPathNotFound() {
+unitTest({ permissions: { read: true } }, async function realPathNotFound() {
await assertRejects(async () => {
await Deno.realPath("bad_filename");
}, Deno.errors.NotFound);