(instance: TestInstance)
| 8 | } |
| 9 | |
| 10 | export function getTextInputValue(instance: TestInstance) { |
| 11 | if (!isHostTextInput(instance)) { |
| 12 | throw new Error(`Element is not a "TextInput", but it has type "${instance.type}".`); |
| 13 | } |
| 14 | |
| 15 | return ( |
| 16 | instance.props.value ?? |
| 17 | nativeState.valueForInstance.get(instance) ?? |
| 18 | instance.props.defaultValue ?? |
| 19 | '' |
| 20 | ); |
| 21 | } |
no test coverage detected
searching dependent graphs…