1
+ /* eslint-env mocha */
1
2
'use strict'
2
3
3
4
const chai = require ( 'chai' )
@@ -60,7 +61,7 @@ module.exports = (common) => {
60
61
it ( '.wantlist' , ( done ) => {
61
62
ipfsB . bitswap . wantlist ( ( err , list ) => {
62
63
expect ( err ) . to . not . exist ( )
63
- expect ( list . Keys ) . to . have . length ( 1 ) ;
64
+ expect ( list . Keys ) . to . have . length ( 1 )
64
65
expect ( list . Keys [ 0 ] [ '/' ] ) . to . equal ( key )
65
66
done ( )
66
67
} )
@@ -79,9 +80,9 @@ module.exports = (common) => {
79
80
this . skip ( )
80
81
}
81
82
ipfsB . bitswap . unwant ( key , ( err ) => {
82
- expect ( err ) . to . not . exist ( ) ;
83
+ expect ( err ) . to . not . exist ( )
83
84
ipfsB . bitswap . wantlist ( ( err , list ) => {
84
- expect ( err ) . to . not . exist ( ) ;
85
+ expect ( err ) . to . not . exist ( )
85
86
expect ( list . Keys ) . to . be . empty ( )
86
87
done ( )
87
88
} )
@@ -119,8 +120,8 @@ module.exports = (common) => {
119
120
it ( '.stat gives error while offline' , ( done ) => {
120
121
ipfs . bitswap . stat ( ( err , stats ) => {
121
122
expect ( err ) . to . exist ( )
122
- //When run against core we get our expected error, when run
123
- //as part of the http tests we get a connection refused
123
+ // When run against core we get our expected error, when run
124
+ // as part of the http tests we get a connection refused
124
125
if ( err . code !== 'ECONNREFUSED' ) {
125
126
expect ( err ) . to . match ( / o n l i n e m o d e / )
126
127
}
@@ -132,8 +133,8 @@ module.exports = (common) => {
132
133
it ( '.wantlist gives error if offline' , ( done ) => {
133
134
ipfs . bitswap . wantlist ( ( err , list ) => {
134
135
expect ( err ) . to . exist ( )
135
- //When run against core we get our expected error, when run
136
- //as part of the http tests we get a connection refused
136
+ // When run against core we get our expected error, when run
137
+ // as part of the http tests we get a connection refused
137
138
if ( err . code !== 'ECONNREFUSED' ) {
138
139
expect ( err ) . to . match ( / o n l i n e m o d e / )
139
140
}
@@ -146,8 +147,8 @@ module.exports = (common) => {
146
147
const key = 'QmUBdnXXPyoDFXj3Hj39dNJ5VkN3QFRskXxcGaYFBB8CNR'
147
148
ipfs . bitswap . unwant ( key , ( err ) => {
148
149
expect ( err ) . to . exist ( )
149
- //When run against core we get our expected error, when run
150
- //as part of the http tests we get a connection refused
150
+ // When run against core we get our expected error, when run
151
+ // as part of the http tests we get a connection refused
151
152
if ( err . code !== 'ECONNREFUSED' ) {
152
153
expect ( err ) . to . match ( / o n l i n e m o d e / )
153
154
}
0 commit comments