mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
9 lines
292 B
TypeScript
9 lines
292 B
TypeScript
import { renderHook } from '@testing-library/react-native';
|
|
|
|
test('uses destructured rerender and unmount from renderHook', () => {
|
|
const { rerender, unmount, result } = renderHook(() => ({ value: 42 }));
|
|
rerender({ value: 43 });
|
|
expect(result.current.value).toBe(43);
|
|
unmount();
|
|
});
|