@@ -32,7 +32,7 @@ function spawnNode ({ dht = false }, cb) {
3232 } , cb )
3333}
3434
35- describe ( 'ping' , function ( ) {
35+ describe . only ( 'ping' , function ( ) {
3636 this . timeout ( 60 * 1000 )
3737
3838 if ( ! isNode ) return
@@ -85,10 +85,10 @@ describe('ping', function () {
8585 const count = 3
8686 pull (
8787 ipfsdA . api . pingPullStream ( ipfsdBId , { count } ) ,
88- drain ( ( { Success , Time , Text } ) => {
89- expect ( Success ) . to . be . true ( )
88+ drain ( ( { success , time , text } ) => {
89+ expect ( success ) . to . be . true ( )
9090 // It's a pong
91- if ( Time ) {
91+ if ( time ) {
9292 packetNum ++
9393 }
9494 } , ( err ) => {
@@ -104,16 +104,16 @@ describe('ping', function () {
104104 const count = 2
105105 pull (
106106 ipfsdA . api . pingPullStream ( 'unknown' , { count } ) ,
107- drain ( ( { Success , Time , Text } ) => {
107+ drain ( ( { success , time , text } ) => {
108108 messageNum ++
109109 // Assert that the ping command falls back to the peerRouting
110110 if ( messageNum === 1 ) {
111- expect ( Text ) . to . include ( 'Looking up' )
111+ expect ( text ) . to . include ( 'Looking up' )
112112 }
113113
114114 // Fails accordingly while trying to use peerRouting
115115 if ( messageNum === 2 ) {
116- expect ( Success ) . to . be . false ( )
116+ expect ( success ) . to . be . false ( )
117117 }
118118 } , ( err ) => {
119119 expect ( err ) . to . not . exist ( )
@@ -175,11 +175,9 @@ describe('ping', function () {
175175 parallel ( [
176176 ipfsdA . api . swarm . connect . bind ( ipfsdA . api , bMultiaddr ) ,
177177 ipfsdB . api . swarm . connect . bind ( ipfsdB . api , cMultiaddr )
178- ] , ( err ) => setTimeout ( ( ) => done ( err ) , 500 ) ) // FIXME timeout needed for connections to succeed
178+ ] , ( err ) => setTimeout ( ( ) => done ( err ) , 500 ) ) // FIXME timeout needed for connections to succeed
179179 } )
180180
181-
182-
183181 after ( ( done ) => ipfsdA . stop ( done ) )
184182 after ( ( done ) => ipfsdB . stop ( done ) )
185183 after ( ( done ) => ipfsdC . stop ( done ) )
@@ -190,15 +188,15 @@ describe('ping', function () {
190188 const count = 3
191189 pull (
192190 ipfsdA . api . pingPullStream ( ipfsdCId , { count } ) ,
193- drain ( ( { Success , Time , Text } ) => {
191+ drain ( ( { success , time , text } ) => {
194192 messageNum ++
195- expect ( Success ) . to . be . true ( )
193+ expect ( success ) . to . be . true ( )
196194 // Assert that the ping command falls back to the peerRouting
197195 if ( messageNum === 1 ) {
198- expect ( Text ) . to . include ( 'Looking up' )
196+ expect ( text ) . to . include ( 'Looking up' )
199197 }
200198 // It's a pong
201- if ( Time ) {
199+ if ( time ) {
202200 packetNum ++
203201 }
204202 } , ( err ) => {
0 commit comments