mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
29 lines
596 B
JavaScript
29 lines
596 B
JavaScript
import Progress from '..';
|
|
import { mount, later } from '../../../test';
|
|
|
|
test('calc width', async () => {
|
|
const wrapper = mount(Progress, {
|
|
propsData: {
|
|
showPivot: false,
|
|
percentage: 100,
|
|
},
|
|
});
|
|
await later();
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
wrapper.vm.showPivot = true;
|
|
wrapper.vm.pivotText = 'test';
|
|
await later();
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
|
|
test('track color prop', async () => {
|
|
const wrapper = mount(Progress, {
|
|
propsData: {
|
|
trackColor: 'green',
|
|
},
|
|
});
|
|
|
|
expect(wrapper.element.style.background).toEqual('green');
|
|
});
|