( instance: TestInstance, eventName: string, nearestTouchResponder?: TestInstance, )
| 46 | ]); |
| 47 | |
| 48 | function isEventEnabled( |
| 49 | instance: TestInstance, |
| 50 | eventName: string, |
| 51 | nearestTouchResponder?: TestInstance, |
| 52 | ) { |
| 53 | if (nearestTouchResponder != null && isHostTextInput(nearestTouchResponder)) { |
| 54 | return ( |
| 55 | isEditableTextInput(nearestTouchResponder) || |
| 56 | textInputEventsIgnoringEditableProp.has(eventName) |
| 57 | ); |
| 58 | } |
| 59 | |
| 60 | if (eventsAffectedByPointerEventsProp.has(eventName) && !isPointerEventEnabled(instance)) { |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | const touchStart = nearestTouchResponder?.props.onStartShouldSetResponder?.(); |
| 65 | const touchMove = nearestTouchResponder?.props.onMoveShouldSetResponder?.(); |
| 66 | if (touchStart || touchMove) { |
| 67 | return true; |
| 68 | } |
| 69 | |
| 70 | return touchStart === undefined && touchMove === undefined; |
| 71 | } |
| 72 | |
| 73 | function findEventHandler( |
| 74 | instance: TestInstance, |
no test coverage detected
searching dependent graphs…