diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-09-20 18:32:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-20 18:32:18 -0400 |
commit | 97bb2bdb79cbd0a400c643e7be0029440cb15633 (patch) | |
tree | 92c883d38b7af413fcbfbac82f17775a7064dfec /js/resources_test.ts | |
parent | 93b7acf99d6456e6e194c03f024b788ce5adf20e (diff) |
dial/listen API change (#3000)
Previously: dial("tcp", "deno.land:80")
Now: dial({ hostname: "deno.land", port: 80, transport: "tcp" })
Similarly with listen().
Diffstat (limited to 'js/resources_test.ts')
-rw-r--r-- | js/resources_test.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/js/resources_test.ts b/js/resources_test.ts index 9d68f49f6..753ef3e17 100644 --- a/js/resources_test.ts +++ b/js/resources_test.ts @@ -10,10 +10,8 @@ test(function resourcesStdio(): void { }); testPerm({ net: true }, async function resourcesNet(): Promise<void> { - const addr = "127.0.0.1:4501"; - const listener = Deno.listen("tcp", addr); - - const dialerConn = await Deno.dial("tcp", addr); + const listener = Deno.listen({ port: 4501 }); + const dialerConn = await Deno.dial({ port: 4501 }); const listenerConn = await listener.accept(); const res = Deno.resources(); |