From ee1ed074175d0748ea89319654714bb361dfca20 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Tue, 18 Sep 2018 12:39:55 +0100 Subject: [PATCH] fix: dht find peer and providers --- js/src/dht/findpeer.js | 2 +- js/src/dht/findprovs.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/dht/findpeer.js b/js/src/dht/findpeer.js index f1537f6b..be5ddb86 100644 --- a/js/src/dht/findpeer.js +++ b/js/src/dht/findpeer.js @@ -48,7 +48,7 @@ module.exports = (createCommon, options) => { it('should fail to find other peer if peer does not exist', (done) => { nodeA.dht.findpeer('Qmd7qZS4T7xXtsNFdRoK1trfMs5zU94EpokQ9WFtxdPxsZ', (err, peer) => { - expect(err).to.not.exist() + expect(err).to.exist() expect(peer).to.not.exist() done() }) diff --git a/js/src/dht/findprovs.js b/js/src/dht/findprovs.js index a182aa2e..5d3e0121 100644 --- a/js/src/dht/findprovs.js +++ b/js/src/dht/findprovs.js @@ -60,7 +60,7 @@ module.exports = (createCommon, options) => { }, (cidV0, cb) => nodeA.dht.findprovs(cidV0, cb), (provs, cb) => { - expect(provs.map((p) => p.toB58String())) + expect(provs.map((p) => p.id.toB58String())) .to.eql([nodeB.peerId.id]) cb() }