|
4 | 4 | const multiaddr = require('multiaddr')
|
5 | 5 | const CID = require('cids')
|
6 | 6 | const delay = require('delay')
|
7 |
| -const { isNode, isBrowser } = require('ipfs-utils/src/env') |
| 7 | +const { isNode, isBrowser, isElectron } = require('ipfs-utils/src/env') |
8 | 8 | const { getDescribe, getIt, expect } = require('../utils/mocha')
|
9 | 9 |
|
10 | 10 | /** @typedef { import("ipfsd-ctl/src/factory") } Factory */
|
@@ -99,14 +99,14 @@ module.exports = (common, options) => {
|
99 | 99 |
|
100 | 100 | it('should list peers only once even if they have multiple addresses', async () => {
|
101 | 101 | // TODO: Change to port 0, needs: https://github.com/ipfs/interface-ipfs-core/issues/152
|
102 |
| - const configA = getConfig(isNode || (common.opts && common.opts.type === 'go') ? [ |
| 102 | + const configA = getConfig(isNode || isElectron || (common.opts && common.opts.type === 'go') ? [ |
103 | 103 | '/ip4/127.0.0.1/tcp/16543',
|
104 | 104 | '/ip4/127.0.0.1/tcp/16544'
|
105 | 105 | ] : [
|
106 | 106 | '/ip4/127.0.0.1/tcp/14578/ws/p2p-webrtc-star',
|
107 | 107 | '/ip4/127.0.0.1/tcp/14579/ws/p2p-webrtc-star'
|
108 | 108 | ])
|
109 |
| - const configB = getConfig(isNode || (common.opts && common.opts.type === 'go') ? [ |
| 109 | + const configB = getConfig(isNode || isElectron || (common.opts && common.opts.type === 'go') ? [ |
110 | 110 | '/ip4/127.0.0.1/tcp/26545/ws',
|
111 | 111 | '/ip4/127.0.0.1/tcp/26546/ws'
|
112 | 112 | ] : [
|
|
0 commit comments