[bugfix] Switch: incorrect activeColor when use activeValue

This commit is contained in:
陈嘉涵
2019-06-07 10:52:19 +08:00
parent 094380416e
commit 172ed6eaee
3 changed files with 21 additions and 2 deletions

View File

@@ -60,3 +60,15 @@ test('active-value & inactive-value prop', () => {
expect(input).toHaveBeenCalledWith('2');
expect(change).toHaveBeenCalledWith('2');
});
test('inactive-color prop', () => {
const wrapper = mount(Switch, {
propsData: {
value: '2',
inactiveValue: '2',
inactiveColor: 'black'
}
});
expect(wrapper).toMatchSnapshot();
});