()
| 1008 | it('should not change state if unmounted', async () => { |
| 1009 | const states: Array<UseMutationResult['status']> = [] |
| 1010 | function Mutates() { |
| 1011 | const mutation = useMutation(() => ({ mutationFn: () => sleep(10) })) |
| 1012 | createRenderEffect(() => { |
| 1013 | states.push(mutation.status) |
| 1014 | }) |
| 1015 | return <button onClick={() => mutation.mutate()}>mutate</button> |
| 1016 | } |
| 1017 | function Page() { |
| 1018 | const [mounted, setMounted] = createSignal(true) |
| 1019 | return ( |
nothing calls this directly
no test coverage detected