We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9f694c commit be9e79fCopy full SHA for be9e79f
test/core/listening.node.js
@@ -36,8 +36,8 @@ describe('Listening', () => {
36
37
await libp2p.start()
38
39
- const addrs = libp2p.peerInfo.multiaddrs.toArray().sort((a, b) => a < b ? -1 : 1)
40
-
+ const addrs = libp2p.peerInfo.multiaddrs.toArray()
+
41
// Should get something like:
42
// /ip4/127.0.0.1/tcp/50866
43
// /ip4/192.168.1.2/tcp/50866
@@ -48,7 +48,7 @@ describe('Listening', () => {
48
expect(opts[1].family).to.equal('ipv4')
49
expect(opts[0].transport).to.equal('tcp')
50
expect(opts[1].transport).to.equal('tcp')
51
- expect(opts[0].host).to.equal('127.0.0.1')
+ expect(opts[0].host).to.match(/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/)
52
expect(opts[1].host).to.match(/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/)
53
expect(opts[0].port).to.be.gt(0)
54
expect(opts[1].port).to.be.gt(0)
0 commit comments