This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +34
-26
lines changed
Expand file tree Collapse file tree 2 files changed +34
-26
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ describe('.name', () => {
2424 let testFileCid
2525
2626 before ( function ( done ) {
27- this . timeout ( 20 * 1000 )
27+ this . timeout ( 30 * 1000 )
2828
2929 series ( [
3030 ( cb ) => {
@@ -44,18 +44,22 @@ describe('.name', () => {
4444 } )
4545 } ,
4646 ( cb ) => {
47- ipfsd . api . id ( ( err , id ) => {
48- expect ( err ) . to . not . exist ( )
49- const ma = id . addresses [ 0 ]
50- other . swarm . connect ( ma , cb )
51- } )
52- } ,
53- ( cb ) => {
54- ipfs . files . add ( testfile , ( err , res ) => {
55- expect ( err ) . to . not . exist ( )
56- testFileCid = res [ 0 ] . hash
57- cb ( )
58- } )
47+ parallel ( [
48+ ( cb ) => {
49+ ipfs . id ( ( err , id ) => {
50+ expect ( err ) . to . not . exist ( )
51+ const ma = id . addresses [ 0 ]
52+ other . swarm . connect ( ma , cb )
53+ } )
54+ } ,
55+ ( cb ) => {
56+ ipfs . files . add ( testfile , ( err , res ) => {
57+ expect ( err ) . to . not . exist ( )
58+ testFileCid = res [ 0 ] . hash
59+ cb ( )
60+ } )
61+ }
62+ ] , cb )
5963 }
6064 ] , done )
6165 } )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ describe('.ping', function () {
3030 let otherId
3131
3232 before ( function ( done ) {
33- this . timeout ( 20 * 1000 ) // slow CI
33+ this . timeout ( 30 * 1000 ) // slow CI
3434
3535 series ( [
3636 ( cb ) => {
@@ -50,18 +50,22 @@ describe('.ping', function () {
5050 } )
5151 } ,
5252 ( cb ) => {
53- ipfsd . api . id ( ( err , id ) => {
54- expect ( err ) . to . not . exist ( )
55- const ma = id . addresses [ 0 ]
56- other . swarm . connect ( ma , cb )
57- } )
58- } ,
59- ( cb ) => {
60- other . id ( ( err , id ) => {
61- expect ( err ) . to . not . exist ( )
62- otherId = id . id
63- cb ( )
64- } )
53+ parallel ( [
54+ ( cb ) => {
55+ ipfs . id ( ( err , id ) => {
56+ expect ( err ) . to . not . exist ( )
57+ const ma = id . addresses [ 0 ]
58+ other . swarm . connect ( ma , cb )
59+ } )
60+ } ,
61+ ( cb ) => {
62+ other . id ( ( err , id ) => {
63+ expect ( err ) . to . not . exist ( )
64+ otherId = id . id
65+ cb ( )
66+ } )
67+ }
68+ ] , cb )
6569 }
6670 ] , done )
6771 } )
You can’t perform that action at this time.
0 commit comments