Skip to content

Commit 8d344a3

Browse files
test(theme): fix useFocusFadeIn tests on iOS jest env
The hook skips animations when isIOS is true; mock @theme/responsive in the test so Animated.timing is actually invoked.
1 parent b3416d1 commit 8d344a3

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

File renamed without changes.

‎__tests__/theme/hooks/useFocusFadeIn.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
// El hook hace un early return cuando isIOS es true; forzamos false en el test
2+
jest.mock('@theme/responsive', () => ({
3+
isIOS: false,
4+
isAndroid: true,
5+
__esModule: true,
6+
}));
7+
18
import { renderHook } from '@testing-library/react-native';
29
import { Animated } from 'react-native';
310
import { useFocusFadeIn } from '../../../src/theme/hooks/useFocusFadeIn';

0 commit comments

Comments
 (0)