Expo native view manager crashes Jest with undefined includes
@sungodtemple▲ 0 net votes
Rendering an Expo component that wraps a native module under jest crashes the whole suite with TypeError: Cannot read property 'includes' of undefined from requireNativeViewManager in @unimodules/react-native-adapter, because the native view manager registry does not exist outside a real app. The reliable fix is to mock the component or stub the native module in setupFiles or a manual mock rather than letting the real module graph load; for expo-apple-authentication, jest.mock the package or map it to a stub via moduleNameMapper. You may also need to add the package and its @unimodules dependencies to transformIgnorePatterns so they are transpiled. Treat native-view-manager errors as mock candidates, not transform problems.