From eebc17af8505ddf0882bfaf81733355892ba50ca Mon Sep 17 00:00:00 2001 From: Jonybang Date: Mon, 13 May 2019 14:08:05 +0200 Subject: [PATCH] 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 --- src/core/config.js | 1 + test/core/create-node.spec.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/core/config.js b/src/core/config.js index 7848e69f0e..2fb66bb558 100644 --- a/src/core/config.js +++ b/src/core/config.js @@ -68,6 +68,7 @@ const configSchema = s({ })), Bootstrap: optional(s(['multiaddr-ipfs'])) })), + ipld: 'object?', libp2p: optional(union(['function', 'object'])) // libp2p validates this }, { repoOwner: true diff --git a/test/core/create-node.spec.js b/test/core/create-node.spec.js index cf5ba30e43..4fdf708720 100644 --- a/test/core/create-node.spec.js +++ b/test/core/create-node.spec.js @@ -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() + }) + }) })