Repository navigation
fireEvent(element, 'press') is a no-op on a relation-free Pressable since 3.2.0 #4417
Description
Description
Since 3.2.0, fireEvent(element, 'press') from React Native Testing Library silently does
nothing on a plain <Pressable onPress={...}>. No error is thrown — the handler is simply never
called, so assertions report 0 calls and any waitFor around the press runs until it times out.
This is a test-environment-only bug; runtime behaviour on device is unaffected.
Cause
3.2.0 split Pressable into two engines
(v3/components/Pressable.tsx):
StatefulPressablewhen one ofsimultaneousWith/requireToFail/blockis passedPressableWithTouchableotherwise — the common case
StatefulPressable sets testOnly_onPress / testOnly_onPressIn / testOnly_onPressOut /
testOnly_onLongPress on the button
(StatefulPressable.tsx#L463-L466).
PressableWithTouchable does not. Since the press state machine runs natively, those props are
the only way a test environment can reach the handlers — RNTL looks them up in
event-handler.ts.
In 3.1.0 the single v3 Pressable always forwarded them, so this is a 3.1.0 → 3.2.0 regression
for any app whose Jest suite drives a Pressable.
This is unrelated to #4414, which fixed the testOnly_pressed display state.
Expected
fireEvent(element, 'press') calls onPress, as it did on 3.1.0 and as it still does when a
relation prop is present.
Fix
PR #4416 forwards the four handlers from PressableWithTouchable too, guarded by isTestEnv(),
exactly as StatefulPressable does, and adds a regression test that fails on main.
Steps to reproduce
- In an RN project on
react-native-gesture-handler@3.2.0and
@testing-library/react-native@>=13, make surejest.config.jshas
setupFiles: ['react-native-gesture-handler/jestSetup.js']. - Add the test file from the repro link below.
- Run it.
- The first test fails with
Expected number of calls: >= 1 / Received number of calls: 0; the
second one — identical apart from asimultaneousWithprop — passes. - Downgrade to
react-native-gesture-handler@3.1.0and re-run: both pass.
A link to a Gist, an Expo Snack or a link to a repository that reproduces the bug
The bug only exists under Jest, so a device reproducer would show nothing — the failing test is
the reproduction. PR #4416 also carries a regression test that fails on main.
Gesture Handler version
3.2.0
React Native version
0.86.2
Platforms
Android, iOS (the bug is platform-independent — it happens in the Jest/node environment)
JavaScript runtime
Hermes
Workflow
Using Expo Prebuild or an Expo development build
Architecture
New Architecture (Fabric)
Build type
Debug mode
Device
N/A — reproduces under Jest (jest-expo / @react-native/jest-preset), no device involved
Device model
N/A
Acknowledgements
Yes
Activity
github-actions commentedon Aug 13, 2026
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug. section.
Forward press handlers as `testOnly_*` in `PressableWithTouchable` (#…
Forward press handlers as `testOnly_*` in `PressableWithTouchable` (#…
m-bert commentedon Aug 14, 2026
Hi @huextrat! Thank you for spotting this and submitting a fix! I've just released 3.2.1 with fix, along with #4421. Should be on
npmsoon 😅huextrat commentedon Aug 14, 2026
Great, thank you! It's working well with 3.2.1 👍