Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit bc36c8e

Browse files
author
Alan Shaw
committed
fix: tests
1 parent 29010e3 commit bc36c8e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/constructor.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async function clientWorks (client) {
134134
function expectConfig (ipfs, { host, port, protocol, apiPath }) {
135135
const conf = ipfs.getEndpointConfig()
136136
expect(conf.host).to.be.oneOf([host, 'localhost', ''])
137-
expect(conf.port).to.be.oneOf([port, '5001', 80])
137+
expect(conf.port.toString()).to.be.oneOf([port, '5001', '80'])
138138
expect(conf.protocol).to.equal(protocol || 'http')
139139
expect(conf['api-path']).to.equal(apiPath || '/api/v0/')
140140
}

test/node/swarm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('.swarm.peers', function () {
3030
})
3131

3232
it('handles a go-ipfs <= 0.4.4 peer response', async () => {
33-
const response = { Strings: ['/ip4/73.109.217.59/tcp/49311/ipfs/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm'] }
33+
const response = { Strings: ['/ip4/73.109.217.59/tcp/49311/p2p/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm'] }
3434

3535
const scope = nock(apiUrl)
3636
.post('/api/v0/swarm/peers')
@@ -42,7 +42,7 @@ describe('.swarm.peers', function () {
4242
expect(res).to.be.a('array')
4343
expect(res.length).to.equal(1)
4444
expect(res[0].error).to.not.exist()
45-
expect(res[0].addr.toString()).to.equal('/ip4/73.109.217.59/tcp/49311/ipfs/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm')
45+
expect(res[0].addr.toString()).to.equal('/ip4/73.109.217.59/tcp/49311/p2p/QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm')
4646
expect(res[0].peer.toB58String()).to.equal('QmWjxEGC7BthJrCf7QTModrcsRweHbupdPTY4oGMVoDZXm')
4747
expect(scope.isDone()).to.equal(true)
4848
})

0 commit comments

Comments
 (0)