Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 6d339a2

Browse files
author
Alan Shaw
authored
test: add test for config set with number (#470)
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 7d8b620 commit 6d339a2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/config/set.js

+13
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ module.exports = (createCommon, options) => {
5959
})
6060
})
6161

62+
it('should set a number', (done) => {
63+
const key = 'Discovery.MDNS.Interval'
64+
const val = 11
65+
ipfs.config.set(key, val, function (err) {
66+
expect(err).to.not.exist()
67+
ipfs.config.get(key, function (err, result) {
68+
expect(err).to.not.exist()
69+
expect(result).to.equal(val)
70+
done()
71+
})
72+
})
73+
})
74+
6275
it('should set a JSON object', (done) => {
6376
const key = 'API.HTTPHeaders.Access-Control-Allow-Origin'
6477
const val = ['http://example.io']

0 commit comments

Comments
 (0)