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

Commit 44989f7

Browse files
authored
chore: use latest interface-ipfs-core module
1 parent 066988f commit 44989f7

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"eslint-plugin-react": "^7.6.1",
7272
"go-ipfs-dep": "^0.4.13",
7373
"gulp": "^3.9.1",
74-
"interface-ipfs-core": "~0.49.1",
74+
"interface-ipfs-core": "~0.50.0",
7575
"hapi": "^17.2.0",
7676
"ipfsd-ctl": "~0.28.0",
7777
"pre-commit": "^1.2.2",

test/interface/files-mfs.spec.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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)

test/utils/factory.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const IPFSFactory = require('ipfsd-ctl')
24

35
module.exports = IPFSFactory.create()

0 commit comments

Comments
 (0)