diff options
Diffstat (limited to 'cli/tests/unit/write_file_test.ts')
-rw-r--r-- | cli/tests/unit/write_file_test.ts | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/cli/tests/unit/write_file_test.ts b/cli/tests/unit/write_file_test.ts index 9ad8da578..66f07b9b1 100644 --- a/cli/tests/unit/write_file_test.ts +++ b/cli/tests/unit/write_file_test.ts @@ -4,10 +4,9 @@ import { assertEquals, assertRejects, assertThrows, - unitTest, } from "./test_util.ts"; -unitTest( +Deno.test( { permissions: { read: true, write: true } }, function writeFileSyncSuccess() { const enc = new TextEncoder(); @@ -21,7 +20,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, function writeFileSyncUrl() { const enc = new TextEncoder(); @@ -40,7 +39,7 @@ unitTest( }, ); -unitTest({ permissions: { write: true } }, function writeFileSyncFail() { +Deno.test({ permissions: { write: true } }, function writeFileSyncFail() { const enc = new TextEncoder(); const data = enc.encode("Hello"); const filename = "/baddir/test.txt"; @@ -50,7 +49,7 @@ unitTest({ permissions: { write: true } }, function writeFileSyncFail() { }, Deno.errors.NotFound); }); -unitTest({ permissions: { write: false } }, function writeFileSyncPerm() { +Deno.test({ permissions: { write: false } }, function writeFileSyncPerm() { const enc = new TextEncoder(); const data = enc.encode("Hello"); const filename = "/baddir/test.txt"; @@ -60,7 +59,7 @@ unitTest({ permissions: { write: false } }, function writeFileSyncPerm() { }, Deno.errors.PermissionDenied); }); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, function writeFileSyncUpdateMode() { if (Deno.build.os !== "windows") { @@ -75,7 +74,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, function writeFileSyncCreate() { const enc = new TextEncoder(); @@ -96,7 +95,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, function writeFileSyncAppend() { const enc = new TextEncoder(); @@ -121,7 +120,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, async function writeFileSuccess() { const enc = new TextEncoder(); @@ -135,7 +134,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, async function writeFileUrl() { const enc = new TextEncoder(); @@ -154,7 +153,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, async function writeFileNotFound() { const enc = new TextEncoder(); @@ -167,7 +166,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: false } }, async function writeFilePerm() { const enc = new TextEncoder(); @@ -180,7 +179,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, async function writeFileUpdateMode() { if (Deno.build.os !== "windows") { @@ -195,7 +194,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, async function writeFileCreate() { const enc = new TextEncoder(); @@ -216,7 +215,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, async function writeFileAppend() { const enc = new TextEncoder(); @@ -241,7 +240,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, async function writeFileAbortSignal(): Promise<void> { const ac = new AbortController(); @@ -260,7 +259,7 @@ unitTest( }, ); -unitTest( +Deno.test( { permissions: { read: true, write: true } }, async function writeFileAbortSignalPreAborted(): Promise<void> { const ac = new AbortController(); |