This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 2
2
'use strict'
3
3
4
4
const { getDescribe, getIt, expect } = require ( '../utils/mocha' )
5
+ const isPlainObject = require ( 'is-plain-object' )
5
6
6
7
module . exports = ( createCommon , options ) => {
7
8
const describe = getDescribe ( options )
@@ -32,15 +33,17 @@ module.exports = (createCommon, options) => {
32
33
it ( 'should retrieve the whole config' , ( done ) => {
33
34
ipfs . config . get ( ( err , config ) => {
34
35
expect ( err ) . to . not . exist ( )
35
- expect ( config ) . to . exist ( )
36
+ expect ( config ) . to . be . an ( 'object' )
37
+ expect ( isPlainObject ( config ) ) . to . be . true
36
38
done ( )
37
39
} )
38
40
} )
39
41
40
42
it ( 'should retrieve the whole config (promised)' , ( ) => {
41
43
return ipfs . config . get ( )
42
44
. then ( ( config ) => {
43
- expect ( config ) . to . exist ( )
45
+ expect ( config ) . to . be . an ( 'object' )
46
+ expect ( isPlainObject ( config ) ) . to . be . true
44
47
} )
45
48
} )
46
49
Original file line number Diff line number Diff line change 53
53
"peer-id" : " ~0.11.0" ,
54
54
"peer-info" : " ~0.14.1" ,
55
55
"pull-stream" : " ^3.6.8" ,
56
- "pump" : " ^3.0.0"
56
+ "pump" : " ^3.0.0" ,
57
+ "is-plain-object" : " ^2.0.4"
57
58
},
58
- "devDependencies" : {},
59
59
"contributors" : [
60
60
" Alan Shaw <alan@tableflip.io>" ,
61
61
" Alex Potsides <alex@achingbrain.net>" ,
You can’t perform that action at this time.
0 commit comments