summaryrefslogtreecommitdiff
path: root/cli/tests/unit/resources_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/resources_test.ts')
-rw-r--r--cli/tests/unit/resources_test.ts6
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();