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/resources_test.ts | |
parent | 299c7cfe54cb184e0d0c18b00a154c953b433ebf (diff) |
refactor(cli/tests): remove unnecessary void return types (#11577)
Diffstat (limited to 'cli/tests/unit/resources_test.ts')
-rw-r--r-- | cli/tests/unit/resources_test.ts | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cli/tests/unit/resources_test.ts b/cli/tests/unit/resources_test.ts index 96fd4ff2c..ea183a068 100644 --- a/cli/tests/unit/resources_test.ts +++ b/cli/tests/unit/resources_test.ts @@ -1,13 +1,13 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; -unitTest(function resourcesCloseBadArgs(): void { +unitTest(function resourcesCloseBadArgs() { assertThrows(() => { Deno.close((null as unknown) as number); }, TypeError); }); -unitTest(function resourcesStdio(): void { +unitTest(function resourcesStdio() { const res = Deno.resources(); assertEquals(res[0], "stdin"); @@ -15,9 +15,7 @@ unitTest(function resourcesStdio(): void { assertEquals(res[2], "stderr"); }); -unitTest({ perms: { net: true } }, async function resourcesNet(): Promise< - void -> { +unitTest({ perms: { net: true } }, async function resourcesNet() { const listener = Deno.listen({ port: 4501 }); const dialerConn = await Deno.connect({ port: 4501 }); const listenerConn = await listener.accept(); @@ -37,9 +35,7 @@ unitTest({ perms: { net: true } }, async function resourcesNet(): Promise< listener.close(); }); -unitTest({ perms: { read: true } }, async function resourcesFile(): Promise< - void -> { +unitTest({ perms: { read: true } }, async function resourcesFile() { const resourcesBefore = Deno.resources(); const f = await Deno.open("cli/tests/hello.txt"); const resourcesAfter = Deno.resources(); |