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) })