(key: string, variables: unknown, data: unknown)
| 1701 | ) |
| 1702 | fireEvent.click(rendered.getByText('Mutations')) |
| 1703 | const execute = (key: string, variables: unknown, data: unknown) => |
| 1704 | queryClient |
| 1705 | .getMutationCache() |
| 1706 | .build(queryClient, { |
| 1707 | mutationKey: [key], |
| 1708 | mutationFn: () => Promise.resolve(data), |
| 1709 | }) |
| 1710 | .execute(variables) |
| 1711 | execute('by-variables', { title: 'Needle' }, 'ok') |
| 1712 | execute('by-data', { title: 'other' }, { id: 'needle-1' }) |
| 1713 | execute('needle-key', { title: 'other' }, 'ok') |
no test coverage detected