如何使用 jest emzyme 为多选组件编写单元测试用例

时间:2021-02-02 11:06:23

标签: reactjs unit-testing jestjs enzyme

我想在单元测试中使用 jest 酶覆盖 MultiSelect 组件,特别是 onSelectChange 部分......任何线索都会有所帮助 '''

<Form.Label>Country </Form.Label >
<MultiSelect
options={countryoptions} 
selected={country}
disableSearch={false}
onSelectChange={selectCountry=>{this.setState({country:selectCountry});
return null;
}} 
/>

'''

0 个答案:

没有答案