Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 8dc5aef

Browse files
author
Pedro Santos
committed
chore: code review changes
1 parent 8cf9074 commit 8dc5aef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/utils/interface-common-factory.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const DEFAULT_FACTORY_OPTIONS = {
1616
function createFactory (options) {
1717
options = options || {}
1818

19-
options.factoryOptions = options.factoryOptions || DEFAULT_FACTORY_OPTIONS
19+
options.factoryOptions = options.factoryOptions || { ...DEFAULT_FACTORY_OPTIONS }
2020
options.spawnOptions = mergeOptions({
2121
initOptions: { bits: 512 },
2222
config: {
@@ -78,8 +78,9 @@ function createAsync (options = {}) {
7878
const nodes = []
7979
const setup = async (setupOptions = {}) => {
8080
options.factoryOptions = mergeOptions(
81+
options.factoryOptions ? {} : { ...DEFAULT_FACTORY_OPTIONS },
8182
setupOptions.factoryOptions,
82-
options.factoryOptions || DEFAULT_FACTORY_OPTIONS
83+
options.factoryOptions
8384
)
8485

8586
// When not an in proc daemon use the http-client js-ipfs depends on, not the one from ipfsd-ctl

0 commit comments

Comments
 (0)