diff options
author | Leo K <crowlkats@toaxl.com> | 2021-08-05 13:08:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-05 13:08:58 +0200 |
commit | 3f0cf9619fce71a8898c495501df4bdb0e07e735 (patch) | |
tree | 1b8af2c832f8344f9a39f55326d576eab63f447f /cli/tests/unit/read_link_test.ts | |
parent | 299c7cfe54cb184e0d0c18b00a154c953b433ebf (diff) |
refactor(cli/tests): remove unnecessary void return types (#11577)
Diffstat (limited to 'cli/tests/unit/read_link_test.ts')
-rw-r--r-- | cli/tests/unit/read_link_test.ts | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/cli/tests/unit/read_link_test.ts b/cli/tests/unit/read_link_test.ts index cab27cbdc..3d00cda1a 100644 --- a/cli/tests/unit/read_link_test.ts +++ b/cli/tests/unit/read_link_test.ts @@ -9,7 +9,7 @@ import { unitTest( { perms: { write: true, read: true } }, - function readLinkSyncSuccess(): void { + function readLinkSyncSuccess() { const testDir = Deno.makeTempDirSync(); const target = testDir + (Deno.build.os == "windows" ? "\\target" : "/target"); @@ -24,7 +24,7 @@ unitTest( unitTest( { perms: { write: true, read: true } }, - function readLinkSyncUrlSuccess(): void { + function readLinkSyncUrlSuccess() { const testDir = Deno.makeTempDirSync(); const target = testDir + (Deno.build.os == "windows" ? "\\target" : "/target"); @@ -37,13 +37,13 @@ unitTest( }, ); -unitTest({ perms: { read: false } }, function readLinkSyncPerm(): void { +unitTest({ perms: { read: false } }, function readLinkSyncPerm() { assertThrows(() => { Deno.readLinkSync("/symlink"); }, Deno.errors.PermissionDenied); }); -unitTest({ perms: { read: true } }, function readLinkSyncNotFound(): void { +unitTest({ perms: { read: true } }, function readLinkSyncNotFound() { assertThrows(() => { Deno.readLinkSync("bad_filename"); }, Deno.errors.NotFound); @@ -51,7 +51,7 @@ unitTest({ perms: { read: true } }, function readLinkSyncNotFound(): void { unitTest( { perms: { write: true, read: true } }, - async function readLinkSuccess(): Promise<void> { + async function readLinkSuccess() { const testDir = Deno.makeTempDirSync(); const target = testDir + (Deno.build.os == "windows" ? "\\target" : "/target"); @@ -66,7 +66,7 @@ unitTest( unitTest( { perms: { write: true, read: true } }, - async function readLinkUrlSuccess(): Promise<void> { + async function readLinkUrlSuccess() { const testDir = Deno.makeTempDirSync(); const target = testDir + (Deno.build.os == "windows" ? "\\target" : "/target"); @@ -79,9 +79,7 @@ unitTest( }, ); -unitTest({ perms: { read: false } }, async function readLinkPerm(): Promise< - void -> { +unitTest({ perms: { read: false } }, async function readLinkPerm() { await assertThrowsAsync(async () => { await Deno.readLink("/symlink"); }, Deno.errors.PermissionDenied); |