()
| 18 | it('should call onReset on reset', () => { |
| 19 | const onReset = jest.fn(); |
| 20 | const Form = () => { |
| 21 | const ref = useRef<HTMLInputElement>(null); |
| 22 | useFormReset(ref, '', onReset); |
| 23 | return ( |
| 24 | <form> |
| 25 | <input ref={ref} type="text" /> |
| 26 | <button type="reset">Reset</button> |
| 27 | </form> |
| 28 | ); |
| 29 | }; |
| 30 | const {getByRole} = render(<Form />); |
| 31 | const button = getByRole('button'); |
| 32 | fireEvent.click(button); |
nothing calls this directly
no test coverage detected