From 9b1589c23946ace07483e5004d35880114bde729 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2019 12:16:17 +0000 Subject: [PATCH] chore: update multiaddr to version 7.2.0 (#1136) * fix(package): update multiaddr to version 7.2.0 * fix: tests --- package.json | 2 +- test/constructor.spec.js | 2 +- test/node/swarm.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2b7a24ba9..a45e2e32e 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "ky-universal": "^0.3.0", "lru-cache": "^5.1.1", "merge-options": "^2.0.0", - "multiaddr": "^6.0.6", + "multiaddr": "^7.2.0", "multibase": "~0.6.0", "multicodec": "~0.5.1", "multihashes": "~0.4.14", diff --git a/test/constructor.spec.js b/test/constructor.spec.js index e4a7eb1aa..c728c94c1 100644 --- a/test/constructor.spec.js +++ b/test/constructor.spec.js @@ -134,7 +134,7 @@ async function clientWorks (client) { function expectConfig (ipfs, { host, port, protocol, apiPath }) { const conf = ipfs.getEndpointConfig() expect(conf.host).to.be.oneOf([host, 'localhost', '']) - expect(conf.port).to.be.oneOf([port, '5001', 80]) + expect(conf.port.toString()).to.be.oneOf([port, '5001', '80']) expect(conf.protocol).to.equal(protocol || 'http') expect(conf['api-path']).to.equal(apiPath || '/api/v0/') } diff --git a/test/node/swarm.js b/test/node/swarm.js index 27d377904..b54690dc0 100644 --- a/test/node/swarm.js +++ b/test/node/swarm.js @@ -30,7 +30,7 @@ describe('.swarm.peers', function () { }) it('handles a go-ipfs <= 0.4.4 peer response', async () => { - const response = { Strings: ['/ip4/73.109.217.59/tcp/49311/ipfs/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm'] } + const response = { Strings: ['/ip4/73.109.217.59/tcp/49311/p2p/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm'] } const scope = nock(apiUrl) .post('/api/v0/swarm/peers') @@ -42,7 +42,7 @@ describe('.swarm.peers', function () { expect(res).to.be.a('array') expect(res.length).to.equal(1) expect(res[0].error).to.not.exist() - expect(res[0].addr.toString()).to.equal('/ip4/73.109.217.59/tcp/49311/ipfs/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm') + expect(res[0].addr.toString()).to.equal('/ip4/73.109.217.59/tcp/49311/p2p/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm') expect(res[0].peer.toB58String()).to.equal('QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm') expect(scope.isDone()).to.equal(true) })