| 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') |