File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -301,19 +301,19 @@ describe('ReactQueryDevtools', () => {
301301
302302 function Page ( ) {
303303 const query1Result = useQuery ( [ 'query-1' ] , async ( ) => {
304- await sleep ( 20 )
304+ await sleep ( 10 )
305305 return 'query-1-result'
306306 } )
307307
308308 const query2Result = useQuery ( [ 'query-2' ] , async ( ) => {
309- await sleep ( 60 )
309+ await sleep ( 90 )
310310 return 'query-2-result'
311311 } )
312312
313313 const query3Result = useQuery (
314314 [ 'query-3' ] ,
315315 async ( ) => {
316- await sleep ( 40 )
316+ await sleep ( 50 )
317317 return 'query-3-result'
318318 } ,
319319 { staleTime : Infinity }
@@ -356,7 +356,9 @@ describe('ReactQueryDevtools', () => {
356356 expect ( queries [ 2 ] ?. textContent ) . toEqual ( query3Hash )
357357
358358 // Wait for the queries to be resolved
359- await sleep ( 70 )
359+ await waitFor ( ( ) => {
360+ expect ( queryClient . isFetching ( ) ) . toBe ( 0 )
361+ } )
360362
361363 // When sorted by the last updated date the queries are sorted by the time
362364 // they were updated and since the query-2 takes longest time to complete
You can’t perform that action at this time.
0 commit comments