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

Commit eebc17a

Browse files
MicrowaveDevAlan Shaw
authored and
Alan Shaw
committed
fix: correctly validate ipld config (#2033)
* fix: add ipld to validation config of options * test: pass ipld options * test: move ipld options test to create-node
1 parent f4e3bd0 commit eebc17a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/core/config.js

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const configSchema = s({
6868
})),
6969
Bootstrap: optional(s(['multiaddr-ipfs']))
7070
})),
71+
ipld: 'object?',
7172
libp2p: optional(union(['function', 'object'])) // libp2p validates this
7273
}, {
7374
repoOwner: true

test/core/create-node.spec.js

+14
Original file line numberDiff line numberDiff line change
@@ -409,4 +409,18 @@ describe('create node', function () {
409409
})
410410
})
411411
})
412+
413+
it('ipld: { }', function (done) {
414+
this.timeout(80 * 1000)
415+
416+
const node = new IPFS({
417+
repo: tempRepo,
418+
ipld: {}
419+
})
420+
421+
node.once('start', (err) => {
422+
expect(err).to.not.exist()
423+
done()
424+
})
425+
})
412426
})

0 commit comments

Comments
 (0)