Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58ddf77 commit 0ec1a0cCopy full SHA for 0ec1a0c
test/bootstrap.spec.js
test/interface/bootstrap.spec.js
@@ -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