mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[bugfix] Switch: incorrect activeColor when use activeValue
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
Reference in New Issue
Block a user