Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 80b3ac4

Browse files
author
Alan Shaw
authored
test: add assertion for swarm.peers latency value (#511)
1 parent d8a28b5 commit 80b3ac4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/swarm/peers.js

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ module.exports = (createCommon, options) => {
9191
expect(multiaddr.isMultiaddr(peer.addr)).to.equal(true)
9292
expect(peer).to.have.a.property('peer')
9393
expect(peer).to.have.a.property('latency')
94+
expect(peer.latency).to.match(/n\/a|[0-9]+m?s/) // n/a or 3ms or 3s
9495

9596
// Only available in 0.4.5
9697
// expect(peer).to.have.a.property('muxer')

0 commit comments

Comments
 (0)