diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-09-23 07:50:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-23 01:50:50 +0200 |
commit | 830586d242216e64fcd16e65cc83db9d54d63dc0 (patch) | |
tree | a84f0090faaa14879693016e9d9b13fcfbb92dcd /cli/tests/unit/copy_file_test.ts | |
parent | 87e78802b0ae65cc57d66eaa8e5265f74cf69092 (diff) |
test(cli): align unit test permissions with runtime test permissions (#12189)
Diffstat (limited to 'cli/tests/unit/copy_file_test.ts')
-rw-r--r-- | cli/tests/unit/copy_file_test.ts | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/cli/tests/unit/copy_file_test.ts b/cli/tests/unit/copy_file_test.ts index c9b82c77e..cc2699bd3 100644 --- a/cli/tests/unit/copy_file_test.ts +++ b/cli/tests/unit/copy_file_test.ts @@ -28,7 +28,7 @@ function assertSameContent( } unitTest( - { perms: { read: true, write: true } }, + { permissions: { read: true, write: true } }, function copyFileSyncSuccess() { const tempDir = Deno.makeTempDirSync(); const fromFilename = tempDir + "/from.txt"; @@ -45,7 +45,7 @@ unitTest( ); unitTest( - { perms: { read: true, write: true } }, + { permissions: { read: true, write: true } }, function copyFileSyncByUrl() { const tempDir = Deno.makeTempDirSync(); const fromUrl = new URL( @@ -66,7 +66,7 @@ unitTest( ); unitTest( - { perms: { write: true, read: true } }, + { permissions: { write: true, read: true } }, function copyFileSyncFailure() { const tempDir = Deno.makeTempDirSync(); const fromFilename = tempDir + "/from.txt"; @@ -81,7 +81,7 @@ unitTest( ); unitTest( - { perms: { write: true, read: false } }, + { permissions: { write: true, read: false } }, function copyFileSyncPerm1() { assertThrows(() => { Deno.copyFileSync("/from.txt", "/to.txt"); @@ -90,7 +90,7 @@ unitTest( ); unitTest( - { perms: { write: false, read: true } }, + { permissions: { write: false, read: true } }, function copyFileSyncPerm2() { assertThrows(() => { Deno.copyFileSync("/from.txt", "/to.txt"); @@ -99,7 +99,7 @@ unitTest( ); unitTest( - { perms: { read: true, write: true } }, + { permissions: { read: true, write: true } }, function copyFileSyncOverwrite() { const tempDir = Deno.makeTempDirSync(); const fromFilename = tempDir + "/from.txt"; @@ -118,7 +118,7 @@ unitTest( ); unitTest( - { perms: { read: true, write: true } }, + { permissions: { read: true, write: true } }, async function copyFileSuccess() { const tempDir = Deno.makeTempDirSync(); const fromFilename = tempDir + "/from.txt"; @@ -135,7 +135,7 @@ unitTest( ); unitTest( - { perms: { read: true, write: true } }, + { permissions: { read: true, write: true } }, async function copyFileByUrl() { const tempDir = Deno.makeTempDirSync(); const fromUrl = new URL( @@ -156,7 +156,7 @@ unitTest( ); unitTest( - { perms: { read: true, write: true } }, + { permissions: { read: true, write: true } }, async function copyFileFailure() { const tempDir = Deno.makeTempDirSync(); const fromFilename = tempDir + "/from.txt"; @@ -171,7 +171,7 @@ unitTest( ); unitTest( - { perms: { read: true, write: true } }, + { permissions: { read: true, write: true } }, async function copyFileOverwrite() { const tempDir = Deno.makeTempDirSync(); const fromFilename = tempDir + "/from.txt"; @@ -190,7 +190,7 @@ unitTest( ); unitTest( - { perms: { read: false, write: true } }, + { permissions: { read: false, write: true } }, async function copyFilePerm1() { await assertRejects(async () => { await Deno.copyFile("/from.txt", "/to.txt"); @@ -199,7 +199,7 @@ unitTest( ); unitTest( - { perms: { read: true, write: false } }, + { permissions: { read: true, write: false } }, async function copyFilePerm2() { await assertRejects(async () => { await Deno.copyFile("/from.txt", "/to.txt"); |