chore: apply suggestions from code review

Co-authored-by: Irakli Gozalishvili <contact@gozala.io>
This commit is contained in:
Vasco Santos
2021-04-20 11:23:31 +02:00
parent 828a32d4f5
commit 3ffeb4ebe6
3 changed files with 18 additions and 6 deletions

View File

@ -359,6 +359,7 @@ describe('auto-relay', () => {
expect(relayLibp2p1.connectionManager.size).to.equal(1)
// Spy on dial
sinon.spy(autoRelay1, '_tryToListenOnRelay')
sinon.spy(relayLibp2p1, 'dial')
// Remove peer used as relay from peerStore and disconnect it
@ -369,6 +370,7 @@ describe('auto-relay', () => {
// Wait for other peer connected to be added as listen addr
await pWaitFor(() => relayLibp2p1.transportManager.listen.callCount === 2)
expect(autoRelay1._tryToListenOnRelay.callCount).to.equal(1)
expect(autoRelay1._listenRelays.size).to.equal(1)
expect(relayLibp2p1.connectionManager.size).to.eql(1)
})