@@ -362,34 +362,54 @@ test('reproducer #4245', async () => {
362362 await router . load ( )
363363
364364 // We wait for the initial loader to complete
365- const fooLink = await screen . findByRole ( 'link' , { name : 'foo' } , { timeout : LOADER_WAIT_TIME + WAIT_TIME } )
365+ const fooLink = await screen . findByRole (
366+ 'link' ,
367+ { name : 'foo' } ,
368+ { timeout : LOADER_WAIT_TIME + WAIT_TIME } ,
369+ )
366370 expect ( fooLink ) . toBeInTheDocument ( )
367371
368372 // We navigate to the foo route
369373 fireEvent . click ( fooLink )
370374
371375 // We immediately see the content of the foo route
372- const indexLink = await screen . findByRole ( 'link' , { name : 'index' } , { timeout : WAIT_TIME } )
376+ const indexLink = await screen . findByRole (
377+ 'link' ,
378+ { name : 'index' } ,
379+ { timeout : WAIT_TIME } ,
380+ )
373381 expect ( indexLink ) . toBeInTheDocument ( )
374382
375383 // We navigate to the index route
376384 fireEvent . click ( indexLink )
377385
378386 // We immediately see the content of the index route because the stale data is still available
379- const fooLink2 = await screen . findByRole ( 'link' , { name : 'foo' } , { timeout : WAIT_TIME } )
387+ const fooLink2 = await screen . findByRole (
388+ 'link' ,
389+ { name : 'foo' } ,
390+ { timeout : WAIT_TIME } ,
391+ )
380392 expect ( fooLink2 ) . toBeInTheDocument ( )
381393
382394 // We navigate to the foo route again
383395 fireEvent . click ( fooLink2 )
384396
385397 // We immediately see the content of the foo route
386- const indexLink2 = await screen . findByRole ( 'link' , { name : 'index' } , { timeout : WAIT_TIME } )
398+ const indexLink2 = await screen . findByRole (
399+ 'link' ,
400+ { name : 'index' } ,
401+ { timeout : WAIT_TIME } ,
402+ )
387403 expect ( indexLink2 ) . toBeInTheDocument ( )
388404
389405 // We navigate to the index route again
390406 fireEvent . click ( indexLink2 )
391407
392408 // We now should see the content of the index route immediately because the stale data is still available
393- const fooLink3 = await screen . findByRole ( 'link' , { name : 'foo' } , { timeout : WAIT_TIME } )
409+ const fooLink3 = await screen . findByRole (
410+ 'link' ,
411+ { name : 'foo' } ,
412+ { timeout : WAIT_TIME } ,
413+ )
394414 expect ( fooLink3 ) . toBeInTheDocument ( )
395- } )
415+ } )
0 commit comments