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

Commit 0974b73

Browse files
author
Alan Shaw
committed
fix: tests
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 6c17081 commit 0974b73

File tree

4 files changed

+8
-172
lines changed

4 files changed

+8
-172
lines changed

src/lib/configure.browser.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ module.exports = create => config => {
99

1010
if (typeof config === 'string') {
1111
config = { apiAddr: config }
12-
}
13-
14-
// Multiaddr instance
15-
if (config.constructor && config.constructor.isMultiaddr) {
12+
} else if (config.constructor && config.constructor.isMultiaddr) {
1613
config = { apiAddr: config }
14+
} else {
15+
config = { ...config }
1716
}
1817

1918
config.fetch = config.fetch || require('./fetch').fetch

src/lib/configure.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ module.exports = create => config => {
1010

1111
if (typeof config === 'string') {
1212
config = { apiAddr: config }
13-
}
14-
15-
// Multiaddr instance
16-
if (config.constructor && config.constructor.isMultiaddr) {
13+
} else if (config.constructor && config.constructor.isMultiaddr) {
1714
config = { apiAddr: config }
15+
} else {
16+
config = { ...config }
1817
}
1918

2019
config.fetch = config.fetch || require('./fetch').fetch

test/interface.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ describe('interface-ipfs-core tests', () => {
231231
tests.namePubsub(CommonFactory.create({
232232
spawnOptions: {
233233
args: ['--enable-namesys-pubsub'],
234-
initOptions: { bits: 1024 }
234+
initOptions: { bits: 1024, profile: 'test' }
235235
}
236236
}), {
237237
skip: [
@@ -272,7 +272,7 @@ describe('interface-ipfs-core tests', () => {
272272
tests.pubsub(CommonFactory.create({
273273
spawnOptions: {
274274
args: ['--enable-pubsub-experiment'],
275-
initOptions: { bits: 1024 }
275+
initOptions: { bits: 1024, profile: 'test' }
276276
}
277277
}), {
278278
skip: isWindows ? [

test/pubsub-in-browser.spec.js

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)