当我进行开玩笑的测试时,我得到这个TypeError:this。$ el.chosen不是一个函数
我的Chosen.test.js
const React = require('react');
const { shallow } = require('enzyme');
const Chosen = require('app/component/Chosen/Chosen');
describe('Chosen test cases', () => {
it('render Chosen component without crashing', () => {
shallow(<Chosen placeholder='select' id="someId">
<option value=""/>
<option value="aa">Aa</option>
<option value="bb">Bb</option>
<option value="cc">Cc</option>
</Chosen>);
});
});