运行JS文件测试并且不确定如何为以下行设置测试代码:
showRequireAllFieldsMessage = () => {
let options = {
type: toast.TYPE.ERROR,
position: toast.POSITION.TOP_LEFT
}
toast( <div>Header is missing fields!</div>, options)
}
使用笑话和酶: 遵循这些原则?感谢您的帮助
it ('Test Show Require All Fields Message ',() => {
expect(wrapper.instance().showRequireAllFieldsMessage('test')).toEqual();
wrapper.find('div').toEqual('Header is missing fields!')
});