MCPcopy Create free account
hub / github.com/TanStack/query / buildMutations

Function buildMutations

packages/query-devtools/src/__tests__/Devtools.test.tsx:295–301  ·  view source on GitHub ↗
(count: number)

Source from the content-addressed store, hash-verified

293 it('should read the mutation cache as often for clearing many mutations as for clearing one', async () => {
294 const mutationCache = queryClient.getMutationCache()
295 const buildMutations = (count: number) => {
296 for (let index = 0; index < count; index++) {
297 mutationCache.build(queryClient, {
298 mutationKey: [`mutation-${index}`],
299 })
300 }
301 }
302 const rendered = renderDevtools({ initialIsOpen: true })
303 fireEvent.click(rendered.getByText('Mutations'))
304 const getAll = vi.spyOn(mutationCache, 'getAll')

Callers 1

Devtools.test.tsxFile · 0.85

Calls 1

buildMethod · 0.45

Tested by

no test coverage detected