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', () => {
39
39
} )
40
40
notifyManagerTest . batch ( callbackBatchLevel1Spy )
41
41
42
- await vi . advanceTimersByTimeAsync ( 20 )
42
+ await vi . advanceTimersByTimeAsync ( 0 )
43
43
expect ( callbackBatchLevel1Spy ) . toHaveBeenCalledTimes ( 1 )
44
44
expect ( callbackBatchLevel2Spy ) . toHaveBeenCalledTimes ( 1 )
45
45
expect ( callbackScheduleSpy ) . toHaveBeenCalledTimes ( 1 )
@@ -57,9 +57,7 @@ describe('notifyManager', () => {
57
57
58
58
expect ( customCallback ) . toHaveBeenCalledOnce ( )
59
59
60
- // wait until the microtask has run
61
- await new Promise < void > ( ( res ) => queueMicrotask ( res ) )
62
-
60
+ await vi . advanceTimersByTimeAsync ( 0 )
63
61
expect ( notifySpy ) . toHaveBeenCalledTimes ( 1 )
64
62
} )
65
63
You can’t perform that action at this time.
0 commit comments