This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 47
47
"form-data" : " ^1.0.0-rc4" ,
48
48
"gulp" : " ^3.9.1" ,
49
49
"idb-plus-blob-store" : " ^1.1.2" ,
50
- "interface-ipfs-core" : " ^0.6 .0" ,
50
+ "interface-ipfs-core" : " ^0.7 .0" ,
51
51
"left-pad" : " ^1.1.1" ,
52
52
"lodash" : " ^4.14.1" ,
53
53
"ncp" : " ^2.0.0" ,
117
117
118
118
119
119
]
120
- }
120
+ }
Original file line number Diff line number Diff line change 2
2
'use strict'
3
3
4
4
const test = require ( 'interface-ipfs-core' )
5
- const IPFS = require ( '../../../src/core ' )
5
+ const IPFSFactory = require ( '../../utils/factory ' )
6
6
7
- // let factory
7
+ let factory
8
8
9
9
const common = {
10
10
setup : function ( cb ) {
11
- // TODO change to factory
12
- const ipfs = new IPFS ( require ( '../../utils/repo-path' ) )
13
- ipfs . load ( ( ) => {
14
- cb ( null , ipfs )
15
- } )
11
+ factory = new IPFSFactory ( )
12
+ cb ( null , factory )
16
13
} ,
17
14
teardown : function ( cb ) {
18
- // factory.teardown
19
- cb ( )
15
+ factory . dismantle ( cb )
20
16
}
21
17
}
22
18
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ function Factory () {
37
37
38
38
if ( ! config ) {
39
39
const defaultConfigPath = path . join ( __dirname , 'default-config.json' )
40
- config = JSON . parse ( fs . readFileSync ( defaultConfigPath ) . toString ( ) )
40
+ config = fs . readFileSync ( defaultConfigPath )
41
+ config = JSON . parse ( config . toString ( ) )
41
42
const pId = PeerId . create ( ) . toJSON ( )
42
43
config . Identity . PeerID = pId . id
43
44
config . Identity . PrivKey = pId . privKey
You can’t perform that action at this time.
0 commit comments