@@ -23,7 +23,7 @@ import type { PeerStore, Peer } from '@libp2p/interface/peer-store'
2323import type { ConnectionManager } from '@libp2p/interface-internal/connection-manager'
2424
2525describe ( 'auto-dial' , ( ) => {
26- let autoDialler : AutoDial
26+ let autoDialer : AutoDial
2727 let events : TypedEventTarget < Libp2pEvents >
2828 let peerStore : PeerStore
2929 let peerId : PeerId
@@ -39,8 +39,8 @@ describe('auto-dial', () => {
3939 } )
4040
4141 afterEach ( ( ) => {
42- if ( autoDialler != null ) {
43- autoDialler . stop ( )
42+ if ( autoDialer != null ) {
43+ autoDialer . stop ( )
4444 }
4545 } )
4646
@@ -74,16 +74,16 @@ describe('auto-dial', () => {
7474 getDialQueue : Sinon . stub ( ) . returns ( [ ] )
7575 } )
7676
77- autoDialler = new AutoDial ( defaultComponents ( {
77+ autoDialer = new AutoDial ( defaultComponents ( {
7878 peerStore,
7979 connectionManager,
8080 events
8181 } ) , {
8282 minConnections : 10 ,
8383 autoDialInterval : 10000
8484 } )
85- autoDialler . start ( )
86- void autoDialler . autoDial ( )
85+ autoDialer . start ( )
86+ void autoDialer . autoDial ( )
8787
8888 await pWaitFor ( ( ) => {
8989 return connectionManager . openConnection . callCount === 1
@@ -128,15 +128,15 @@ describe('auto-dial', () => {
128128 getDialQueue : Sinon . stub ( ) . returns ( [ ] )
129129 } )
130130
131- autoDialler = new AutoDial ( defaultComponents ( {
131+ autoDialer = new AutoDial ( defaultComponents ( {
132132 peerStore,
133133 connectionManager,
134134 events
135135 } ) , {
136136 minConnections : 10
137137 } )
138- autoDialler . start ( )
139- await autoDialler . autoDial ( )
138+ autoDialer . start ( )
139+ await autoDialer . autoDial ( )
140140
141141 await pWaitFor ( ( ) => connectionManager . openConnection . callCount === 1 )
142142 await delay ( 1000 )
@@ -182,15 +182,15 @@ describe('auto-dial', () => {
182182 } ] )
183183 } )
184184
185- autoDialler = new AutoDial ( defaultComponents ( {
185+ autoDialer = new AutoDial ( defaultComponents ( {
186186 peerStore,
187187 connectionManager,
188188 events
189189 } ) , {
190190 minConnections : 10
191191 } )
192- autoDialler . start ( )
193- await autoDialler . autoDial ( )
192+ autoDialer . start ( )
193+ await autoDialer . autoDial ( )
194194
195195 await pWaitFor ( ( ) => connectionManager . openConnection . callCount === 1 )
196196 await delay ( 1000 )
@@ -208,20 +208,20 @@ describe('auto-dial', () => {
208208 getDialQueue : Sinon . stub ( ) . returns ( [ ] )
209209 } )
210210
211- autoDialler = new AutoDial ( defaultComponents ( {
211+ autoDialer = new AutoDial ( defaultComponents ( {
212212 peerStore,
213213 connectionManager,
214214 events
215215 } ) , {
216216 minConnections : 10 ,
217217 autoDialInterval : 10000
218218 } )
219- autoDialler . start ( )
219+ autoDialer . start ( )
220220
221221 // call autodial twice
222222 await Promise . all ( [
223- autoDialler . autoDial ( ) ,
224- autoDialler . autoDial ( )
223+ autoDialer . autoDial ( ) ,
224+ autoDialer . autoDial ( )
225225 ] )
226226
227227 // should only have queried peer store once
@@ -259,17 +259,17 @@ describe('auto-dial', () => {
259259 getDialQueue : Sinon . stub ( ) . returns ( [ ] )
260260 } )
261261
262- autoDialler = new AutoDial ( defaultComponents ( {
262+ autoDialer = new AutoDial ( defaultComponents ( {
263263 peerStore,
264264 connectionManager,
265265 events
266266 } ) , {
267267 minConnections : 10 ,
268268 autoDialPeerRetryThreshold : 2000
269269 } )
270- autoDialler . start ( )
270+ autoDialer . start ( )
271271
272- void autoDialler . autoDial ( )
272+ void autoDialer . autoDial ( )
273273
274274 await pWaitFor ( ( ) => {
275275 return connectionManager . openConnection . callCount === 1
@@ -283,7 +283,7 @@ describe('auto-dial', () => {
283283 await delay ( 2000 )
284284
285285 // autodial again
286- void autoDialler . autoDial ( )
286+ void autoDialer . autoDial ( )
287287
288288 await pWaitFor ( ( ) => {
289289 return connectionManager . openConnection . callCount === 3
0 commit comments