[bugfix] Switch: incorrect activeColor when use activeValue
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`inactive-color prop 1`] = `
|
||||
<div role="switch" aria-checked="false" class="van-switch" style="font-size: 30px; background-color: black;">
|
||||
<div class="van-switch__node"></div>
|
||||
</div>
|
||||
`;
|
||||
@@ -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