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

Commit f0a4fb9

Browse files
refactor: moved bootstrap tests to interface-ipfs-core
1 parent 44989f7 commit f0a4fb9

File tree

2 files changed

+32
-113
lines changed

2 files changed

+32
-113
lines changed

test/bootstrap.spec.js

-113
This file was deleted.

test/interface/bootstrap.spec.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/* eslint-env mocha */
2+
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.bootstrap(common)

0 commit comments

Comments
 (0)