diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-06-25 00:41:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 00:41:13 +0200 |
commit | 6bbe52fba33e440e113bca423b5eae0d1f320c49 (patch) | |
tree | fa7d16377ed3ac5a9a190be9bd9a63cd9fc36e52 /cli/tests/complex_permissions_test.ts | |
parent | f39c890714ad4479b42be8f24ffda185a062bd16 (diff) |
Revert "fix(cli): ipv6 parsing for --allow-net params (#6453)" (#6458)
Diffstat (limited to 'cli/tests/complex_permissions_test.ts')
-rw-r--r-- | cli/tests/complex_permissions_test.ts | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/cli/tests/complex_permissions_test.ts b/cli/tests/complex_permissions_test.ts index f4b8e6c73..ad8b5302c 100644 --- a/cli/tests/complex_permissions_test.ts +++ b/cli/tests/complex_permissions_test.ts @@ -14,11 +14,7 @@ const test: { [key: string]: Function } = { }, netListen(endpoints: string[]): void { endpoints.forEach((endpoint) => { - const index = endpoint.lastIndexOf(":"); - const [hostname, port] = [ - endpoint.substr(0, index), - endpoint.substr(index + 1), - ]; + const [hostname, port] = endpoint.split(":"); const listener = Deno.listen({ transport: "tcp", hostname, @@ -29,11 +25,7 @@ const test: { [key: string]: Function } = { }, async netConnect(endpoints: string[]): Promise<void> { for (const endpoint of endpoints) { - const index = endpoint.lastIndexOf(":"); - const [hostname, port] = [ - endpoint.substr(0, index), - endpoint.substr(index + 1), - ]; + const [hostname, port] = endpoint.split(":"); const listener = await Deno.connect({ transport: "tcp", hostname, |