Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions packages/query-core/src/__tests__/notifyManager.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('notifyManager', () => {
})
notifyManagerTest.batch(callbackBatchLevel1Spy)

await vi.advanceTimersByTimeAsync(20)
await vi.advanceTimersByTimeAsync(0)
expect(callbackBatchLevel1Spy).toHaveBeenCalledTimes(1)
expect(callbackBatchLevel2Spy).toHaveBeenCalledTimes(1)
expect(callbackScheduleSpy).toHaveBeenCalledTimes(1)
Expand All @@ -57,9 +57,7 @@ describe('notifyManager', () => {

expect(customCallback).toHaveBeenCalledOnce()

// wait until the microtask has run
await new Promise<void>((res) => queueMicrotask(res))

await vi.advanceTimersByTimeAsync(0)
expect(notifySpy).toHaveBeenCalledTimes(1)
})

Expand Down
Loading