我的反应类组件如下所示:
import { Field, reduxForm, propTypes } from 'redux-form';
class DepositAmountInput extends Component {
render() {
return (
<View>
<Field
component={NumberInputField}
props={{
onChange: this.handleInput,
onBlur: this.handleOnBlur
}}
/>
</View>
);
}
}
export default DepositAmountInput
在我对此组件的Jest测试中,如何模拟redux-form的Field组件?我正在寻找这样的东西:
.mock(&#39; redux-form / lib / Field&#39;,()=&gt;&#39; Field&#39;);
谢谢!