Skip to content
Source
Sign inSign up
TanStack/query

fix(query-core): replace scheduleMicrotask with queueMicrotask #6592

ClosedNathanHuisman(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/6592/headopened View on GitHub

Showing 3 changed files with 2 additions and 20 deletions.

x
0 of 3 viewed, 3 left
0 additions and 13 deletionspackages/query-core/src/tests/utils.test.tsxModified
View file
@@ -7,8 +7,6 @@
matchMutation,
partialMatchKey,
replaceEqualDeep,
- scheduleMicrotask,
- sleep,
} from '../utils'
import { Mutation } from '../mutation'
import { createQueryClient } from './utils'
@@ -342,17 +340,6 @@
​
- describe('scheduleMicrotask', () => {
- it('should defer execution of callback', async () => {
- const callback = vi.fn()
-​
- scheduleMicrotask(callback)
- expect(callback).not.toHaveBeenCalled()
- await sleep(0)
- expect(callback).toHaveBeenCalledTimes(1)
- })
- })
-​
describe('addToEnd', () => {