from "./useCounter"; test('should reset counter to updated initial value 2', () => { const {result, rerender} = renderHook(({initialValue}) => useCounter(initialValue), { initialProps: {initialValue: 0}, }) rerender({initialValue: 10}) act(() => { result.current.reset() }) expect(result.current.count).toBe(10) })