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

Commit 7a9c4d0

Browse files
committed
fix: ensure there is another node to provide to
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 4f9b635 commit 7a9c4d0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

js/src/dht/provide.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
'use strict'
33

44
const CID = require('cids')
5+
const { spawnNodesWithId } = require('../utils/spawn')
56
const { getDescribe, getIt, expect } = require('../utils/mocha')
67

78
module.exports = (createCommon, options) => {
@@ -22,10 +23,10 @@ module.exports = (createCommon, options) => {
2223
common.setup((err, factory) => {
2324
expect(err).to.not.exist()
2425

25-
factory.spawnNode((err, node) => {
26+
spawnNodesWithId(2, factory, (err, nodes) => {
2627
expect(err).to.not.exist()
27-
ipfs = node
28-
done()
28+
ipfs = nodes[0]
29+
ipfs.swarm.connect(nodes[1].peerId.addresses[0], done)
2930
})
3031
})
3132
})

0 commit comments

Comments
 (0)