diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-05-22 13:35:59 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-22 13:35:59 -0600 |
commit | 612226de8e2fe3068d981866242bacedfceb9734 (patch) | |
tree | 318d644be0770ce1bff9bf1ceff415c0b4705ec2 /cli/tests/unit/resources_test.ts | |
parent | ffa020f43a2a0d04fade562b2f82cd1a39913780 (diff) |
chore(cli): One Rust test per JS and Node unit test file (#19199)
This runs our `js_unit_tests` and `node_unit_tests` in parallel, one
rust test per JS unit test file. Some of our JS tests don't like running
in parallel due to port requirements, so this also makes those use a
specific port-per-file. This does not attempt to make the node-compat
tests work.
Diffstat (limited to 'cli/tests/unit/resources_test.ts')
-rw-r--r-- | cli/tests/unit/resources_test.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/tests/unit/resources_test.ts b/cli/tests/unit/resources_test.ts index 2d1f2fd75..4a55f05a7 100644 --- a/cli/tests/unit/resources_test.ts +++ b/cli/tests/unit/resources_test.ts @@ -1,6 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals, assertThrows } from "./test_util.ts"; +const listenPort = 4505; + Deno.test(function resourcesCloseBadArgs() { assertThrows(() => { Deno.close((null as unknown) as number); @@ -16,8 +18,8 @@ Deno.test(function resourcesStdio() { }); Deno.test({ permissions: { net: true } }, async function resourcesNet() { - const listener = Deno.listen({ port: 4501 }); - const dialerConn = await Deno.connect({ port: 4501 }); + const listener = Deno.listen({ port: listenPort }); + const dialerConn = await Deno.connect({ port: listenPort }); const listenerConn = await listener.accept(); const res = Deno.resources(); |