You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
This PR fixed a problem related to `HandlerName must be used as a
descendant of GestureHandlerRootView. Otherwise the gestures will not be
recognized. See
https://docs.swmansion.com/react-native-gesture-handler/docs/installation
for more details.` in jest.
<!--
Description and motivation for this PR.
In some project
Include 'Fixes #<number>' if this is fixing some issue.
-->
## Related issues
[2488](#2488)
## Test plan
tested locally on my project :)
Copy file name to clipboardExpand all lines: src/handlers/createHandler.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -402,7 +402,7 @@ export default function createHandler<
402
402
}
403
403
404
404
render(){
405
-
if(__DEV__&&!this.context){
405
+
if(__DEV__&&!this.context&&!isJestEnv()){
406
406
thrownewError(
407
407
name+
408
408
' must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'
'GestureDetector must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'
0 commit comments