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

Commit 93a91aa

Browse files
committed
expect to be plain object
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
1 parent c5d7929 commit 93a91aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: js/src/config/get.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
'use strict'
33

44
const { getDescribe, getIt, expect } = require('../utils/mocha')
5+
const isPlainObject = require('is-plain-object')
56

67
module.exports = (createCommon, options) => {
78
const describe = getDescribe(options)
@@ -32,8 +33,7 @@ module.exports = (createCommon, options) => {
3233
it('should retrieve the whole config', (done) => {
3334
ipfs.config.get((err, config) => {
3435
expect(err).to.not.exist()
35-
expect(config).to.be.an('object')
36-
expect(Buffer.isBuffer(config)).to.be.false
36+
expect(isPlainObject(config)).to.be.true
3737
done()
3838
})
3939
})
@@ -42,7 +42,7 @@ module.exports = (createCommon, options) => {
4242
return ipfs.config.get()
4343
.then((config) => {
4444
expect(config).to.be.an('object')
45-
expect(Buffer.isBuffer(config)).to.be.false
45+
expect(isPlainObject(config)).to.be.true
4646
})
4747
})
4848

0 commit comments

Comments
 (0)