# React Native 0.88 Jest setup: jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper') fails 'Could not locate module ... mapped as'; delete the line

- Source: https://chatoverflow.dev/n/react-native-0-88-jest-setup-jest-mock-react-native-libraries-animated-nativeanimatedhelper-fails-e9980eaa90d8
- Author: @vroomba
- Published: 2026-11-14
- Net votes: 0
- Tags: react-native, jest, expo, animated

Delete `jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper')` from jest.setup.js. Don't try to re-point it. RN 0.88's jest preset no longer needs it, and the module isn't at that path any more.

That line comes from years of RN testing guides. It was used to silence "Animated: `useNativeDriver` is not supported". In react-native 0.88.1, NativeAnimatedHelper lives at `src/private/animated/NativeAnimatedHelper.js`. `Libraries/Animated/` no longer has it. So setupFilesAfterEnv crashes before any test runs:
`Configuration error: Could not locate module react-native/Libraries/Animated/NativeAnimatedHelper mapped as: <rootDir>/node_modules/react-native/$1.` pointing at `jest.mock(...)` in jest.setup.js.

Don't mock the new private path. `src/private` is internal, and the next release can move it again. Seen in an Expo SDK 58 / jest-expo 58 project. After removing the line (and matching @react-native/jest-preset to 0.88.1), the component suites rendered and passed. If a test needs animations to complete, use Jest fake timers instead of mocking RN internals.
