@@ -22,7 +22,7 @@ import type { PeerStore, Peer } from '@libp2p/interface/peer-store'
2222import type { ConnectionManager } from '@libp2p/interface-internal/connection-manager'
2323
2424describe ( 'auto-dial' , ( ) => {
25- let autoDialler : AutoDial
25+ let autoDialer : AutoDial
2626 let events : EventEmitter < Libp2pEvents >
2727 let peerStore : PeerStore
2828 let peerId : PeerId
@@ -38,8 +38,8 @@ describe('auto-dial', () => {
3838 } )
3939
4040 afterEach ( ( ) => {
41- if ( autoDialler != null ) {
42- autoDialler . stop ( )
41+ if ( autoDialer != null ) {
42+ autoDialer . stop ( )
4343 }
4444 } )
4545
@@ -73,16 +73,16 @@ describe('auto-dial', () => {
7373 getDialQueue : [ ]
7474 } )
7575
76- autoDialler = new AutoDial ( {
76+ autoDialer = new AutoDial ( {
7777 peerStore,
7878 connectionManager,
7979 events
8080 } , {
8181 minConnections : 10 ,
8282 autoDialInterval : 10000
8383 } )
84- autoDialler . start ( )
85- void autoDialler . autoDial ( )
84+ autoDialer . start ( )
85+ void autoDialer . autoDial ( )
8686
8787 await pWaitFor ( ( ) => {
8888 return connectionManager . openConnection . callCount === 1
@@ -127,15 +127,15 @@ describe('auto-dial', () => {
127127 getDialQueue : [ ]
128128 } )
129129
130- autoDialler = new AutoDial ( {
130+ autoDialer = new AutoDial ( {
131131 peerStore,
132132 connectionManager,
133133 events
134134 } , {
135135 minConnections : 10
136136 } )
137- autoDialler . start ( )
138- await autoDialler . autoDial ( )
137+ autoDialer . start ( )
138+ await autoDialer . autoDial ( )
139139
140140 await pWaitFor ( ( ) => connectionManager . openConnection . callCount === 1 )
141141 await delay ( 1000 )
@@ -181,15 +181,15 @@ describe('auto-dial', () => {
181181 } ]
182182 } )
183183
184- autoDialler = new AutoDial ( {
184+ autoDialer = new AutoDial ( {
185185 peerStore,
186186 connectionManager,
187187 events
188188 } , {
189189 minConnections : 10
190190 } )
191- autoDialler . start ( )
192- await autoDialler . autoDial ( )
191+ autoDialer . start ( )
192+ await autoDialer . autoDial ( )
193193
194194 await pWaitFor ( ( ) => connectionManager . openConnection . callCount === 1 )
195195 await delay ( 1000 )
@@ -207,20 +207,20 @@ describe('auto-dial', () => {
207207 getDialQueue : [ ]
208208 } )
209209
210- autoDialler = new AutoDial ( {
210+ autoDialer = new AutoDial ( {
211211 peerStore,
212212 connectionManager,
213213 events
214214 } , {
215215 minConnections : 10 ,
216216 autoDialInterval : 10000
217217 } )
218- autoDialler . start ( )
218+ autoDialer . start ( )
219219
220220 // call autodial twice
221221 await Promise . all ( [
222- autoDialler . autoDial ( ) ,
223- autoDialler . autoDial ( )
222+ autoDialer . autoDial ( ) ,
223+ autoDialer . autoDial ( )
224224 ] )
225225
226226 // should only have queried peer store once
@@ -258,17 +258,17 @@ describe('auto-dial', () => {
258258 getDialQueue : [ ]
259259 } )
260260
261- autoDialler = new AutoDial ( {
261+ autoDialer = new AutoDial ( {
262262 peerStore,
263263 connectionManager,
264264 events
265265 } , {
266266 minConnections : 10 ,
267267 autoDialPeerRetryThreshold : 2000
268268 } )
269- autoDialler . start ( )
269+ autoDialer . start ( )
270270
271- void autoDialler . autoDial ( )
271+ void autoDialer . autoDial ( )
272272
273273 await pWaitFor ( ( ) => {
274274 return connectionManager . openConnection . callCount === 1
@@ -282,7 +282,7 @@ describe('auto-dial', () => {
282282 await delay ( 2000 )
283283
284284 // autodial again
285- void autoDialler . autoDial ( )
285+ void autoDialer . autoDial ( )
286286
287287 await pWaitFor ( ( ) => {
288288 return connectionManager . openConnection . callCount === 3
0 commit comments