@@ -138,7 +138,9 @@ module.exports = (common) => {
138
138
expect ( msg ) . to . have . property ( 'topicIDs' ) . eql ( [ topic ] )
139
139
expect ( msg ) . to . have . property ( 'from' , ipfs1 . peerId . id )
140
140
141
- ipfs1 . pubsub . unsubscribe ( topic , handler , ( ) => {
141
+ ipfs1 . pubsub . unsubscribe ( topic , handler , ( err ) => {
142
+ expect ( err ) . to . not . exist ( )
143
+
142
144
ipfs1 . pubsub . ls ( ( err , topics ) => {
143
145
expect ( err ) . to . not . exist ( )
144
146
expect ( topics ) . to . be . empty ( )
@@ -164,7 +166,9 @@ module.exports = (common) => {
164
166
expect ( msg ) . to . have . property ( 'topicIDs' ) . eql ( [ topic ] )
165
167
expect ( msg ) . to . have . property ( 'from' , ipfs1 . peerId . id )
166
168
167
- ipfs1 . pubsub . unsubscribe ( topic , handler , ( ) => {
169
+ ipfs1 . pubsub . unsubscribe ( topic , handler , ( err ) => {
170
+ expect ( err ) . to . not . exist ( )
171
+
168
172
ipfs1 . pubsub . ls ( ( err , topics ) => {
169
173
expect ( err ) . to . not . exist ( )
170
174
expect ( topics ) . to . be . empty ( )
@@ -190,7 +194,9 @@ module.exports = (common) => {
190
194
expect ( msg ) . to . have . property ( 'topicIDs' ) . eql ( [ topic ] )
191
195
expect ( msg ) . to . have . property ( 'from' , ipfs1 . peerId . id )
192
196
193
- ipfs1 . pubsub . unsubscribe ( topic , handler , ( ) => {
197
+ ipfs1 . pubsub . unsubscribe ( topic , handler , ( err ) => {
198
+ expect ( err ) . to . not . exist ( )
199
+
194
200
ipfs1 . pubsub . ls ( ( err , topics ) => {
195
201
expect ( err ) . to . not . exist ( )
196
202
expect ( topics ) . to . be . empty ( )
@@ -251,9 +257,7 @@ module.exports = (common) => {
251
257
ipfs1 . pubsub . unsubscribe ( topic , handler , check )
252
258
}
253
259
254
- ipfs1 . pubsub . subscribe ( topic , {
255
- discover : true
256
- } , handler , ( err ) => {
260
+ ipfs1 . pubsub . subscribe ( topic , handler , { discover : true } , ( err ) => {
257
261
expect ( err ) . to . not . exist ( )
258
262
ipfs1 . pubsub . publish ( topic , Buffer . from ( 'hi' ) , check )
259
263
} )
0 commit comments