@@ -26,10 +26,7 @@ function catAndCheck (api, hash, data, callback) {
2626 } )
2727}
2828
29- // The repo was again changed on go-ipfs 0.4.16
30- // TODO: create spec tests for repo
31- describe . skip ( 'repo' , ( ) => {
32- // skipping until https://github.com/ipfs/interop/issues/8 is addressed
29+ describe ( 'repo' , ( ) => {
3330 if ( isWindows ) {
3431 return
3532 }
@@ -80,7 +77,7 @@ describe.skip('repo', () => {
8077 } )
8178
8279 it ( 'read repo: js -> go' , function ( done ) {
83- this . timeout ( 50 * 1000 )
80+ this . timeout ( 80 * 1000 )
8481 const dir = path . join ( os . tmpdir ( ) , hat ( ) )
8582 const data = crypto . randomBytes ( 1024 * 5 )
8683
@@ -91,26 +88,34 @@ describe.skip('repo', () => {
9188 series ( [
9289 ( cb ) => jsDf . spawn ( {
9390 repoPath : dir ,
91+ disposable : false ,
9492 initOptions : { bits : 512 }
95- } , cb ) ,
96- ( node , cb ) => {
93+ } , ( err , node ) => {
94+ expect ( err ) . to . not . exist ( )
95+
9796 jsDaemon = node
98- cb ( )
99- } ,
100- ( cb ) => jsDaemon . api . add ( data , cb ) ,
101- ( res , cb ) => {
97+ jsDaemon . init ( cb )
98+ } ) ,
99+ ( cb ) => jsDaemon . start ( cb ) ,
100+
101+ ( cb ) => jsDaemon . api . add ( data , ( err , res ) => {
102+ expect ( err ) . to . not . exist ( )
103+
102104 hash = res [ 0 ] . hash
103105 catAndCheck ( jsDaemon . api , hash , data , cb )
104- } ,
106+ } ) ,
105107 ( cb ) => jsDaemon . stop ( cb ) ,
106108 ( cb ) => goDf . spawn ( {
107109 repoPath : dir ,
110+ disposable : false ,
108111 initOptions : { bits : 1024 }
109- } , cb ) ,
110- ( node , cb ) => {
112+ } , ( err , node ) => {
113+ expect ( err ) . to . not . exist ( )
114+
111115 goDaemon = node
112116 cb ( )
113- } ,
117+ } ) ,
118+ ( cb ) => goDaemon . start ( cb ) ,
114119 ( cb ) => catAndCheck ( goDaemon . api , hash , data , cb ) ,
115120 ( cb ) => goDaemon . stop ( cb )
116121 ] , done )
0 commit comments