@@ -216,7 +216,7 @@ describe('pubsub base protocol', () => {
216
216
} )
217
217
} )
218
218
219
- describe ( 'getPeersSubscribed ' , ( ) => {
219
+ describe ( 'getSubscribers ' , ( ) => {
220
220
let peerInfo
221
221
let pubsub
222
222
@@ -236,7 +236,7 @@ describe('pubsub base protocol', () => {
236
236
const topic = 'topic-test'
237
237
238
238
try {
239
- pubsub . getPeersSubscribed ( topic )
239
+ pubsub . getSubscribers ( topic )
240
240
} catch ( err ) {
241
241
expect ( err ) . to . exist ( )
242
242
expect ( err . code ) . to . eql ( 'ERR_NOT_STARTED_YET' )
@@ -250,7 +250,7 @@ describe('pubsub base protocol', () => {
250
250
await pubsub . start ( )
251
251
252
252
try {
253
- pubsub . getPeersSubscribed ( )
253
+ pubsub . getSubscribers ( )
254
254
} catch ( err ) {
255
255
expect ( err ) . to . exist ( )
256
256
expect ( err . code ) . to . eql ( 'ERR_NOT_VALID_TOPIC' )
@@ -265,7 +265,7 @@ describe('pubsub base protocol', () => {
265
265
// start pubsub
266
266
await pubsub . start ( )
267
267
268
- let peersSubscribed = pubsub . getPeersSubscribed ( topic )
268
+ let peersSubscribed = pubsub . getSubscribers ( topic )
269
269
expect ( peersSubscribed ) . to . be . empty ( )
270
270
271
271
// Set mock peer subscribed
@@ -275,7 +275,7 @@ describe('pubsub base protocol', () => {
275
275
peer . topics . add ( topic )
276
276
pubsub . peers . set ( id , peer )
277
277
278
- peersSubscribed = pubsub . getPeersSubscribed ( topic )
278
+ peersSubscribed = pubsub . getSubscribers ( topic )
279
279
280
280
expect ( peersSubscribed ) . to . not . be . empty ( )
281
281
expect ( peersSubscribed [ 0 ] ) . to . eql ( id )
0 commit comments