@@ -90,7 +90,7 @@ describe('ServerManager', () => {
9090 it ( 'should create a new worker if it does not exist' , async ( ) => {
9191 // Setup
9292 const configPath = '/path/to/wdio.config.js'
93- const wdioDirName = dirname ( configPath )
93+ const wdioDirName = dirname ( normalize ( configPath ) )
9494 const spyFactory = vi . spyOn ( workerFactory , 'generate' )
9595
9696 // Execute
@@ -113,8 +113,8 @@ describe('ServerManager', () => {
113113
114114 // Assert
115115 expect ( spyFactory ) . toHaveBeenCalledTimes ( 2 )
116- expect ( spyFactory ) . toHaveBeenCalledWith ( '#1' , '/path/to' )
117- expect ( spyFactory ) . toHaveBeenCalledWith ( '#2' , '/another/path' )
116+ expect ( spyFactory ) . toHaveBeenCalledWith ( '#1' , normalize ( '/path/to' ) )
117+ expect ( spyFactory ) . toHaveBeenCalledWith ( '#2' , normalize ( '/another/path' ) )
118118 } )
119119 } )
120120
@@ -187,9 +187,9 @@ describe('ServerManager', () => {
187187
188188 // Assert operations were queued and processed in order
189189 expect ( operations . length ) . toBe ( 3 )
190- expect ( operations [ 0 ] ) . toBe ( ' start:/path/1')
191- expect ( operations [ 1 ] ) . toBe ( ' start:/path/2')
192- expect ( operations [ 2 ] ) . toBe ( ' start:/path/3')
190+ expect ( operations [ 0 ] ) . toBe ( ` start:${ normalize ( ' /path/1') } ` )
191+ expect ( operations [ 1 ] ) . toBe ( ` start:${ normalize ( ' /path/2') } ` )
192+ expect ( operations [ 2 ] ) . toBe ( ` start:${ normalize ( ' /path/3') } ` )
193193 } )
194194
195195 it ( 'should avoid duplicate operations for the same path' , async ( ) => {
@@ -278,7 +278,7 @@ describe('ServerManager', () => {
278278 const stopWorker = ( workerManager as any ) . stopWorker . bind ( workerManager )
279279
280280 // Get the worker from the server pool
281- const worker = ( workerManager as any ) . _workerPool . get ( '/path/to' )
281+ const worker = ( workerManager as any ) . _workerPool . get ( normalize ( '/path/to' ) )
282282
283283 // Execute
284284 await stopWorker ( '/path/to' , worker )
0 commit comments