File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
packages/query-core/src/__tests__ Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ describe('notifyManager', () => {
3939 } )
4040 notifyManagerTest . batch ( callbackBatchLevel1Spy )
4141
42- await vi . advanceTimersByTimeAsync ( 20 )
42+ await vi . advanceTimersByTimeAsync ( 0 )
4343 expect ( callbackBatchLevel1Spy ) . toHaveBeenCalledTimes ( 1 )
4444 expect ( callbackBatchLevel2Spy ) . toHaveBeenCalledTimes ( 1 )
4545 expect ( callbackScheduleSpy ) . toHaveBeenCalledTimes ( 1 )
@@ -57,9 +57,7 @@ describe('notifyManager', () => {
5757
5858 expect ( customCallback ) . toHaveBeenCalledOnce ( )
5959
60- // wait until the microtask has run
61- await new Promise < void > ( ( res ) => queueMicrotask ( res ) )
62-
60+ await vi . advanceTimersByTimeAsync ( 0 )
6361 expect ( notifySpy ) . toHaveBeenCalledTimes ( 1 )
6462 } )
6563
You can’t perform that action at this time.
0 commit comments