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

Commit

Permalink
fix: ensure there is another node to provide to
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
  • Loading branch information
alanshaw committed Jun 26, 2018
1 parent 4058898 commit 0d50c67
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/src/dht/provide.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
'use strict'

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

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

factory.spawnNode((err, node) => {
spawnNodesWithId(2, factory, (err, nodes) => {
expect(err).to.not.exist()
ipfs = node
done()
ipfs = nodes[0]
ipfs.swarm.connect(nodes[1].peerId.addresses[0], done)
})
})
})
Expand Down

0 comments on commit 0d50c67

Please sign in to comment.