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

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alanshaw committed Nov 5, 2019
1 parent 29010e3 commit bc36c8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/constructor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
}
4 changes: 2 additions & 2 deletions test/node/swarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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)
})
Expand Down

0 comments on commit bc36c8e

Please sign in to comment.