chore: apply suggestions from code review

This commit is contained in:
Vasco Santos
2020-07-17 14:00:59 +02:00
committed by Jacob Heun
parent 15613ccf19
commit f574e82a5d
15 changed files with 75 additions and 68 deletions

View File

@ -23,7 +23,7 @@ describe('peer-store', () => {
let peerIds
before(async () => {
peerIds = await peerUtils.createPeerId({
number: 4
number: 5
})
})
@ -31,7 +31,7 @@ describe('peer-store', () => {
let peerStore
beforeEach(() => {
peerStore = new PeerStore()
peerStore = new PeerStore({ peerId: peerIds[4] })
})
it('has an empty map of peers', () => {
@ -61,7 +61,7 @@ describe('peer-store', () => {
let peerStore
beforeEach(() => {
peerStore = new PeerStore()
peerStore = new PeerStore({ peerId: peerIds[4] })
// Add peer0 with { addr1, addr2 } and { proto1 }
peerStore.addressBook.set(peerIds[0], [addr1, addr2])
@ -163,7 +163,7 @@ describe('peer-store', () => {
let peerStore
beforeEach(() => {
peerStore = new PeerStore()
peerStore = new PeerStore({ peerId: peerIds[4] })
})
it('returns peers if only addresses are known', () => {