diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2021-11-23 17:45:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 17:45:18 +0100 |
commit | bedb2adfb065c1b0d3bcb773fbeff91230402b6b (patch) | |
tree | b4d90c36f2409f7f9b6247b74e9c111a38befcdf /cli/tests/unit/resources_test.ts | |
parent | 51e3db956a5927229e3f46f4eaaf317e935f8f17 (diff) |
refactor: remove "unitTest" wrapper from cli/tests/unit (#12750)
Diffstat (limited to 'cli/tests/unit/resources_test.ts')
-rw-r--r-- | cli/tests/unit/resources_test.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/tests/unit/resources_test.ts b/cli/tests/unit/resources_test.ts index 368f7f990..fffd940db 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"; +import { assert, assertEquals, assertThrows } from "./test_util.ts"; -unitTest(function resourcesCloseBadArgs() { +Deno.test(function resourcesCloseBadArgs() { assertThrows(() => { Deno.close((null as unknown) as number); }, TypeError); }); -unitTest(function resourcesStdio() { +Deno.test(function resourcesStdio() { const res = Deno.resources(); assertEquals(res[0], "stdin"); @@ -15,7 +15,7 @@ unitTest(function resourcesStdio() { assertEquals(res[2], "stderr"); }); -unitTest({ permissions: { net: true } }, async function resourcesNet() { +Deno.test({ permissions: { net: true } }, async function resourcesNet() { const listener = Deno.listen({ port: 4501 }); const dialerConn = await Deno.connect({ port: 4501 }); const listenerConn = await listener.accept(); @@ -35,7 +35,7 @@ unitTest({ permissions: { net: true } }, async function resourcesNet() { listener.close(); }); -unitTest({ permissions: { read: true } }, async function resourcesFile() { +Deno.test({ permissions: { read: true } }, async function resourcesFile() { const resourcesBefore = Deno.resources(); const f = await Deno.open("cli/tests/testdata/hello.txt"); const resourcesAfter = Deno.resources(); |