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

Commit

Permalink
fix: correctly validate ipld config (#2033)
Browse files Browse the repository at this point in the history
* fix: add ipld to validation config of options

* test: pass ipld options

* test: move ipld options test to create-node
  • Loading branch information
MicrowaveDev authored and Alan Shaw committed May 13, 2019
1 parent f4e3bd0 commit eebc17a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const configSchema = s({
})),
Bootstrap: optional(s(['multiaddr-ipfs']))
})),
ipld: 'object?',
libp2p: optional(union(['function', 'object'])) // libp2p validates this
}, {
repoOwner: true
Expand Down
14 changes: 14 additions & 0 deletions test/core/create-node.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,4 +409,18 @@ describe('create node', function () {
})
})
})

it('ipld: { }', function (done) {
this.timeout(80 * 1000)

const node = new IPFS({
repo: tempRepo,
ipld: {}
})

node.once('start', (err) => {
expect(err).to.not.exist()
done()
})
})
})

0 comments on commit eebc17a

Please sign in to comment.