feat(CountDown): support SS and S format (#5154)
This commit is contained in:
@@ -5,3 +5,7 @@ exports[`complete format prop 1`] = `<div class="van-count-down">01-05-59-59-999
|
||||
exports[`disable auto-start prop 1`] = `<div class="van-count-down">100</div>`;
|
||||
|
||||
exports[`incomplate format prop 1`] = `<div class="van-count-down">29-59-59-999</div>`;
|
||||
|
||||
exports[`milliseconds format S 1`] = `<div class="van-count-down">01-5</div>`;
|
||||
|
||||
exports[`milliseconds format SS 1`] = `<div class="van-count-down">01-50</div>`;
|
||||
|
||||
@@ -141,6 +141,30 @@ test('complete format prop', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('milliseconds format SS', () => {
|
||||
const wrapper = mount(CountDown, {
|
||||
propsData: {
|
||||
time: 1500,
|
||||
autoStart: false,
|
||||
format: 'ss-SS'
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('milliseconds format S', () => {
|
||||
const wrapper = mount(CountDown, {
|
||||
propsData: {
|
||||
time: 1500,
|
||||
autoStart: false,
|
||||
format: 'ss-S'
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('incomplate format prop', () => {
|
||||
const wrapper = mount(CountDown, {
|
||||
propsData: {
|
||||
|
||||
Reference in New Issue
Block a user