This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree 3 files changed +35
-1
lines changed
3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 71
71
"eslint-plugin-react" : " ^7.6.1" ,
72
72
"go-ipfs-dep" : " ^0.4.13" ,
73
73
"gulp" : " ^3.9.1" ,
74
- "interface-ipfs-core" : " ~0.49.1 " ,
74
+ "interface-ipfs-core" : " ~0.50.0 " ,
75
75
"hapi" : " ^17.2.0" ,
76
76
"ipfsd-ctl" : " ~0.28.0" ,
77
77
"pre-commit" : " ^1.2.2" ,
Original file line number Diff line number Diff line change
1
+ /* eslint-env mocha */
2
+ /* eslint max-nested-callbacks: ["error", 8] */
3
+ 'use strict'
4
+
5
+ const test = require ( 'interface-ipfs-core' )
6
+ const parallel = require ( 'async/parallel' )
7
+
8
+ const IPFSApi = require ( '../../src' )
9
+ const f = require ( '../utils/factory' )
10
+
11
+ const nodes = [ ]
12
+ const common = {
13
+ setup : function ( callback ) {
14
+ callback ( null , {
15
+ spawnNode : ( cb ) => {
16
+ f . spawn ( ( err , _ipfsd ) => {
17
+ if ( err ) {
18
+ return cb ( err )
19
+ }
20
+
21
+ nodes . push ( _ipfsd )
22
+ cb ( null , IPFSApi ( _ipfsd . apiAddr ) )
23
+ } )
24
+ }
25
+ } )
26
+ } ,
27
+ teardown : function ( callback ) {
28
+ parallel ( nodes . map ( ( node ) => ( cb ) => node . stop ( cb ) ) , callback )
29
+ }
30
+ }
31
+
32
+ test . filesMFS ( common )
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
1
3
const IPFSFactory = require ( 'ipfsd-ctl' )
2
4
3
5
module . exports = IPFSFactory . create ( )
You can’t perform that action at this time.
0 commit comments