mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-06-29 14:21:44 +00:00
revert: "feat: listen to array of multiaddrs (#104)"
This reverts commit 5009c2ca49f5e3f1ce8e8fe5f0bd88edbc13b5d8.
This commit is contained in:
committed by
Jacob Heun
parent
c60897fbd8
commit
ff9123d53c
@ -114,14 +114,14 @@ describe('listen', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('getAddrs does not preserve IPFS Id', (done) => {
|
||||
it('getAddrs preserves IPFS Id', (done) => {
|
||||
const mh = multiaddr('/ip4/127.0.0.1/tcp/9090/ipfs/Qmb6owHp6eaWArVbcJJbQSyifyJBttMMjYV76N2hMbf5Vw')
|
||||
const listener = tcp.createListener((conn) => {})
|
||||
listener.listen(mh, () => {
|
||||
listener.getAddrs((err, multiaddrs) => {
|
||||
expect(err).to.not.exist()
|
||||
expect(multiaddrs.length).to.equal(1)
|
||||
expect(multiaddrs[0]).to.deep.equal(mh.decapsulate('ipfs'))
|
||||
expect(multiaddrs[0]).to.deep.equal(mh)
|
||||
listener.close(done)
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user