@@ -26,7 +26,7 @@ describe('bitswap', function () {
26
26
it ( '2 peers' , async function ( ) {
27
27
const remote = ( await df . spawn ( { type : 'js' } ) ) . api
28
28
const proc = ( await df . spawn ( { type : 'proc' } ) ) . api
29
- proc . swarm . connect ( remote . peerId . addresses [ 0 ] )
29
+ await proc . swarm . connect ( remote . peerId . addresses [ 0 ] )
30
30
const block = await makeBlock ( )
31
31
32
32
await proc . block . put ( block )
@@ -41,9 +41,9 @@ describe('bitswap', function () {
41
41
const remote1 = ( await df . spawn ( { type : 'js' } ) ) . api
42
42
const remote2 = ( await df . spawn ( { type : 'js' } ) ) . api
43
43
const proc = ( await df . spawn ( { type : 'proc' } ) ) . api
44
- proc . swarm . connect ( remote1 . peerId . addresses [ 0 ] )
45
- proc . swarm . connect ( remote2 . peerId . addresses [ 0 ] )
46
- remote1 . swarm . connect ( remote2 . peerId . addresses [ 0 ] )
44
+ await proc . swarm . connect ( remote1 . peerId . addresses [ 0 ] )
45
+ await proc . swarm . connect ( remote2 . peerId . addresses [ 0 ] )
46
+ await remote1 . swarm . connect ( remote2 . peerId . addresses [ 0 ] )
47
47
48
48
await remote1 . block . put ( blocks [ 0 ] )
49
49
await remote1 . block . put ( blocks [ 1 ] )
@@ -68,7 +68,7 @@ describe('bitswap', function () {
68
68
const file = Buffer . from ( `I love IPFS <3 ${ hat ( ) } ` )
69
69
const remote = ( await df . spawn ( { type : 'js' } ) ) . api
70
70
const proc = ( await df . spawn ( { type : 'proc' } ) ) . api
71
- proc . swarm . connect ( remote . peerId . addresses [ 0 ] )
71
+ await proc . swarm . connect ( remote . peerId . addresses [ 0 ] )
72
72
73
73
const files = await all ( remote . add ( [ { path : 'awesome.txt' , content : file } ] ) )
74
74
const data = await concat ( proc . cat ( files [ 0 ] . cid ) )
0 commit comments