summaryrefslogtreecommitdiff
path: root/cli/tests/unit/write_text_file_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/write_text_file_test.ts')
-rw-r--r--cli/tests/unit/write_text_file_test.ts28
1 files changed, 14 insertions, 14 deletions
diff --git a/cli/tests/unit/write_text_file_test.ts b/cli/tests/unit/write_text_file_test.ts
index 0ac421116..4424db7db 100644
--- a/cli/tests/unit/write_text_file_test.ts
+++ b/cli/tests/unit/write_text_file_test.ts
@@ -7,7 +7,7 @@ import {
} from "./test_util.ts";
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
function writeTextFileSyncSuccess() {
const filename = Deno.makeTempDirSync() + "/test.txt";
Deno.writeTextFileSync(filename, "Hello");
@@ -17,7 +17,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
function writeTextFileSyncByUrl() {
const tempDir = Deno.makeTempDirSync();
const fileUrl = new URL(
@@ -31,7 +31,7 @@ unitTest(
},
);
-unitTest({ perms: { write: true } }, function writeTextFileSyncFail() {
+unitTest({ permissions: { write: true } }, function writeTextFileSyncFail() {
const filename = "/baddir/test.txt";
// The following should fail because /baddir doesn't exist (hopefully).
assertThrows(() => {
@@ -39,7 +39,7 @@ unitTest({ perms: { write: true } }, function writeTextFileSyncFail() {
}, Deno.errors.NotFound);
});
-unitTest({ perms: { write: false } }, function writeTextFileSyncPerm() {
+unitTest({ permissions: { write: false } }, function writeTextFileSyncPerm() {
const filename = "/baddir/test.txt";
// The following should fail due to no write permission
assertThrows(() => {
@@ -48,7 +48,7 @@ unitTest({ perms: { write: false } }, function writeTextFileSyncPerm() {
});
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
function writeTextFileSyncUpdateMode() {
if (Deno.build.os !== "windows") {
const data = "Hello";
@@ -62,7 +62,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
function writeTextFileSyncCreate() {
const data = "Hello";
const filename = Deno.makeTempDirSync() + "/test.txt";
@@ -84,7 +84,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
function writeTextFileSyncAppend() {
const data = "Hello";
const filename = Deno.makeTempDirSync() + "/test.txt";
@@ -101,7 +101,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
async function writeTextFileSuccess() {
const filename = Deno.makeTempDirSync() + "/test.txt";
await Deno.writeTextFile(filename, "Hello");
@@ -111,7 +111,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
async function writeTextFileByUrl() {
const tempDir = Deno.makeTempDirSync();
const fileUrl = new URL(
@@ -126,7 +126,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
async function writeTextFileNotFound() {
const filename = "/baddir/test.txt";
// The following should fail because /baddir doesn't exist (hopefully).
@@ -137,7 +137,7 @@ unitTest(
);
unitTest(
- { perms: { write: false } },
+ { permissions: { write: false } },
async function writeTextFilePerm() {
const filename = "/baddir/test.txt";
// The following should fail due to no write permission
@@ -148,7 +148,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
async function writeTextFileUpdateMode() {
if (Deno.build.os !== "windows") {
const data = "Hello";
@@ -162,7 +162,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
async function writeTextFileCreate() {
const data = "Hello";
const filename = Deno.makeTempDirSync() + "/test.txt";
@@ -184,7 +184,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true } },
+ { permissions: { read: true, write: true } },
async function writeTextFileAppend() {
const data = "Hello";
const filename = Deno.makeTempDirSync() + "/test.txt";