mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-06-13 03:31:36 +00:00
test: use port 0
docs: add some more jsdocs License: MIT Signed-off-by: Jacob Heun <jacobheun@gmail.com>
This commit is contained in:
@ -183,7 +183,7 @@ describe('dial', () => {
|
||||
handled = resolve
|
||||
})
|
||||
|
||||
const ma = multiaddr('/ip6/::/tcp/9067')
|
||||
const ma = multiaddr('/ip6/::/tcp/0')
|
||||
|
||||
const listener = tcp.createListener(async (conn) => {
|
||||
await pipe(
|
||||
@ -194,7 +194,8 @@ describe('dial', () => {
|
||||
})
|
||||
|
||||
await listener.listen(ma)
|
||||
await pipe(await tcp.dial(ma))
|
||||
const addrs = listener.getAddrs()
|
||||
await pipe(await tcp.dial(addrs[0]))
|
||||
|
||||
await handledPromise
|
||||
await listener.close()
|
||||
@ -210,7 +211,7 @@ describe('dial', () => {
|
||||
handled = resolve
|
||||
})
|
||||
|
||||
const ma = multiaddr('/ip6/::/tcp/9068')
|
||||
const ma = multiaddr('/ip6/::/tcp/0')
|
||||
|
||||
const listener = tcp.createListener(async (conn) => {
|
||||
// pull(conn, pull.onEnd(destroyed))
|
||||
@ -219,7 +220,8 @@ describe('dial', () => {
|
||||
})
|
||||
|
||||
await listener.listen(ma)
|
||||
await pipe([], await tcp.dial(ma))
|
||||
const addrs = listener.getAddrs()
|
||||
await pipe([], await tcp.dial(addrs[0]))
|
||||
|
||||
await handledPromise
|
||||
await listener.close()
|
||||
|
Reference in New Issue
Block a user