(key: string, variables: unknown, data: unknown)
| 1689 | ) |
| 1690 | fireEvent.click(rendered.getByText('Mutations')) |
| 1691 | const execute = (key: string, variables: unknown, data: unknown) => |
| 1692 | queryClient |
| 1693 | .getMutationCache() |
| 1694 | .build(queryClient, { |
| 1695 | mutationKey: [key], |
| 1696 | mutationFn: () => Promise.resolve(data), |
| 1697 | }) |
| 1698 | .execute(variables) |
| 1699 | execute('by-variables', { title: 'Needle' }, 'ok') |
| 1700 | execute('by-data', { title: 'other' }, { id: 'needle-1' }) |
| 1701 | execute('needle-key', { title: 'other' }, 'ok') |
no test coverage detected