jest test fails with refs and Form
问题 I have a search bar component which looks like: render () { const { onChangeTextInput } = this.props return ( <Form name="searchForm" ref={(ref) => { this.searchForm = ref }} > <TextInput noSpacing placeholder={t('search')} name="search" validate="text" icon={this.icon} onChangeTextCallback={() => { onChangeTextInput(this.searchForm.values) }} /> ) </Form> ) } } I am using a shallow render and jest to run a unit test to test the following scenario" User types a character in text input a