Question
如何用mocha測試select
原因
尚未找到
解決方案
使用event和simulate結合
const event = {
target: { value: 25 }
};
frame
.find(".tes-components-Gallery-maximumSelect")
.simulate("change", event);
expect(
frame.find(".tes-components-Gallery-maximumSelect").props().value
).equal(25);