()
| 34 | |
| 35 | it('should be able to reset `data`', async () => { |
| 36 | function Page() { |
| 37 | const mutation = useMutation(() => ({ |
| 38 | mutationFn: () => Promise.resolve('mutation'), |
| 39 | })) |
| 40 | |
| 41 | return ( |
| 42 | <div> |
| 43 | <h1>{mutation.data ?? 'empty'}</h1> |
| 44 | <button onClick={() => mutation.reset()}>reset</button> |
| 45 | <button onClick={() => mutation.mutate()}>mutate</button> |
| 46 | </div> |
| 47 | ) |
| 48 | } |
| 49 | |
| 50 | const rendered = renderWithClient(queryClient, () => <Page />) |
| 51 |
nothing calls this directly
no test coverage detected