(instance: TestInstance, eventName: string, value: unknown)
| 179 | ]); |
| 180 | |
| 181 | function setNativeStateIfNeeded(instance: TestInstance, eventName: string, value: unknown) { |
| 182 | if (eventName === 'changeText' && typeof value === 'string' && isEditableTextInput(instance)) { |
| 183 | nativeState.valueForInstance.set(instance, value); |
| 184 | } |
| 185 | |
| 186 | if (scrollEventNames.has(eventName) && isHostScrollView(instance)) { |
| 187 | const contentOffset = tryGetContentOffset(value); |
| 188 | if (contentOffset) { |
| 189 | nativeState.contentOffsetForInstance.set(instance, contentOffset); |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | function tryGetContentOffset(event: unknown): Point | null { |
| 195 | try { |
no test coverage detected
searching dependent graphs…