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

Commit 3eda55d

Browse files
committed
fix: spawn only as many nodes as needed
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
1 parent a8492f2 commit 3eda55d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

js/src/swarm/addrs.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
const chai = require('chai')
55
const dirtyChai = require('dirty-chai')
6-
const { spawnNodes } = require('../utils/spawn')
76
const { getDescribe, getIt } = require('../utils/mocha')
87

98
const expect = chai.expect
@@ -26,10 +25,9 @@ module.exports = (createCommon, options) => {
2625

2726
common.setup((err, factory) => {
2827
expect(err).to.not.exist()
29-
30-
spawnNodes(2, factory, (err, nodes) => {
28+
factory.spawnNode((err, node) => {
3129
expect(err).to.not.exist()
32-
ipfs = nodes[0]
30+
ipfs = node
3331
done()
3432
})
3533
})

js/src/swarm/local-addrs.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
const chai = require('chai')
55
const dirtyChai = require('dirty-chai')
6-
const { spawnNodes } = require('../utils/spawn')
76
const { getDescribe, getIt } = require('../utils/mocha')
87

98
const expect = chai.expect
@@ -26,10 +25,9 @@ module.exports = (createCommon, options) => {
2625

2726
common.setup((err, factory) => {
2827
expect(err).to.not.exist()
29-
30-
spawnNodes(2, factory, (err, nodes) => {
28+
factory.spawnNode((err, node) => {
3129
expect(err).to.not.exist()
32-
ipfs = nodes[0]
30+
ipfs = node
3331
done()
3432
})
3533
})

0 commit comments

Comments
 (0)