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

Commit

Permalink
fix: fix swarm peer tests for electron
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Feb 1, 2020
1 parent 0fd52d3 commit ac7cedf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/swarm/peers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const multiaddr = require('multiaddr')
const CID = require('cids')
const delay = require('delay')
const { isNode, isBrowser } = require('ipfs-utils/src/env')
const { isNode, isBrowser, isElectron } = require('ipfs-utils/src/env')
const { getDescribe, getIt, expect } = require('../utils/mocha')

/** @typedef { import("ipfsd-ctl/src/factory") } Factory */
Expand Down Expand Up @@ -99,14 +99,14 @@ module.exports = (common, options) => {

it('should list peers only once even if they have multiple addresses', async () => {
// TODO: Change to port 0, needs: https://github.com/ipfs/interface-ipfs-core/issues/152
const configA = getConfig(isNode || (common.opts && common.opts.type === 'go') ? [
const configA = getConfig(isNode || isElectron || (common.opts && common.opts.type === 'go') ? [
'/ip4/127.0.0.1/tcp/16543',
'/ip4/127.0.0.1/tcp/16544'
] : [
'/ip4/127.0.0.1/tcp/14578/ws/p2p-webrtc-star',
'/ip4/127.0.0.1/tcp/14579/ws/p2p-webrtc-star'
])
const configB = getConfig(isNode || (common.opts && common.opts.type === 'go') ? [
const configB = getConfig(isNode || isElectron || (common.opts && common.opts.type === 'go') ? [
'/ip4/127.0.0.1/tcp/26545/ws',
'/ip4/127.0.0.1/tcp/26546/ws'
] : [
Expand Down

0 comments on commit ac7cedf

Please sign in to comment.