Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Kiel committed Dec 3, 2021
1 parent c7eba7b commit eb72430
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/peer-routing/peer-routing.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ describe('peer-routing', () => {
.to.eventually.be.rejected()
.and.to.have.property('code', 'ERR_FIND_SELF')
})

it('should handle error', async () => {
const unknownPeers = await peerUtils.createPeerId({ number: 1, fixture: false})

await expect(nodes[0].peerRouting.findPeer(unknownPeers[0]))
.to.eventually.be.rejected()
.and.to.have.property('code', 'NOT_FOUND')
})
})

describe('via delegate router', () => {
Expand Down

0 comments on commit eb72430

Please sign in to comment.