Skip to content

Commit

Permalink
fix: show whole config (#153)
Browse files Browse the repository at this point in the history
* test: adds test getConfig without key, should get the whole config
  • Loading branch information
tcme authored and daviddias committed Jun 24, 2017
1 parent 5c4136d commit e5a8eb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class Node {
getConfig (key, callback) {
if (typeof key === 'function') {
callback = key
key = ''
key = 'show'
}

async.waterfall([
Expand Down
8 changes: 8 additions & 0 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,14 @@ describe('daemons', () => {
})
})

it('Should return the whole config', (done) => {
ipfsNode.getConfig((err, config) => {
expect(err).to.not.exist()
expect(config).to.exist()
done()
})
})

it('Should set a config value', (done) => {
async.series([
(cb) => ipfsNode.setConfig('Bootstrap', 'null', cb),
Expand Down

0 comments on commit e5a8eb5

Please sign in to comment.