SIGN IN SIGN UP

Fix Errors.test.tsx failing with Reanimated 4.6.0 (#4474)

## Description

Since Reanimated 4.6.0 (software-mansion/react-native-reanimated#10107),
importing `react-native-reanimated` under Jest throws during module
evaluation:

```
    [Reanimated] `setCSSEventHandler` is not available in JSReanimated.
      at initializeReanimatedModule (src/initializers.native.ts:22)
      at Object.<anonymous> (src/index.ts:11)
```

Under `Jest`, `Reanimated` selects its `JSReanimated` module (`IS_JEST`
check in `reanimatedModuleInstance.native.ts`), whose
`setCSSEventHandler` stub throws, and `initializers.native.ts` calls it
unconditionally as an import side effect. Our `reanimatedWrapper`
catches the error and silently falls back to `Reanimated = undefined`.



This PR mocks `reanimatedWrapper` in `Errors.test.tsx` (same pattern as
`runOnJSReanimatedHandlers.test.tsx`), which makes the suite independent
of whether the real Reanimated can be imported under Jest. The mock
additionally provides `useComposedEventHandler`, which
`InterceptingGestureDetector` calls.

## Test plan

- yarn test — 19/19 suites, 159/159 tests pass (Errors.test.tsx was
failing on main before this change)
M
Michał Bert committed
8819ea62ec96e378c417e540ecad179a56944356
Parent: cdc5c59
Committed by GitHub <noreply@github.com> on 8/26/2026, 11:57:04 AM