diff --git a/test/core/bitswap.spec.js b/test/core/bitswap.spec.js index df09c6263e..d772eb8dff 100644 --- a/test/core/bitswap.spec.js +++ b/test/core/bitswap.spec.js @@ -26,7 +26,7 @@ describe('bitswap', function () { it('2 peers', async function () { const remote = (await df.spawn({ type: 'js' })).api const proc = (await df.spawn({ type: 'proc' })).api - proc.swarm.connect(remote.peerId.addresses[0]) + await proc.swarm.connect(remote.peerId.addresses[0]) const block = await makeBlock() await proc.block.put(block) @@ -41,9 +41,9 @@ describe('bitswap', function () { const remote1 = (await df.spawn({ type: 'js' })).api const remote2 = (await df.spawn({ type: 'js' })).api const proc = (await df.spawn({ type: 'proc' })).api - proc.swarm.connect(remote1.peerId.addresses[0]) - proc.swarm.connect(remote2.peerId.addresses[0]) - remote1.swarm.connect(remote2.peerId.addresses[0]) + await proc.swarm.connect(remote1.peerId.addresses[0]) + await proc.swarm.connect(remote2.peerId.addresses[0]) + await remote1.swarm.connect(remote2.peerId.addresses[0]) await remote1.block.put(blocks[0]) await remote1.block.put(blocks[1]) @@ -68,7 +68,7 @@ describe('bitswap', function () { const file = Buffer.from(`I love IPFS <3 ${hat()}`) const remote = (await df.spawn({ type: 'js' })).api const proc = (await df.spawn({ type: 'proc' })).api - proc.swarm.connect(remote.peerId.addresses[0]) + await proc.swarm.connect(remote.peerId.addresses[0]) const files = await all(remote.add([{ path: 'awesome.txt', content: file }])) const data = await concat(proc.cat(files[0].cid)) diff --git a/test/core/name.spec.js b/test/core/name.spec.js index 43de091020..10678c428c 100644 --- a/test/core/name.spec.js +++ b/test/core/name.spec.js @@ -90,9 +90,9 @@ describe('name', function () { nodeB = (await createNode()).api nodeC = (await createNode()).api - nodeC.swarm.connect(nodeA.peerId.addresses[0]) // C => A - nodeC.swarm.connect(nodeB.peerId.addresses[0]) // C => B - nodeA.swarm.connect(nodeB.peerId.addresses[0]) // A => B + await nodeC.swarm.connect(nodeA.peerId.addresses[0]) // C => A + await nodeC.swarm.connect(nodeB.peerId.addresses[0]) // C => B + await nodeA.swarm.connect(nodeB.peerId.addresses[0]) // A => B }) after(() => df.clean())