chore: rename all legacy test cases

This commit is contained in:
chenjiahan
2020-10-13 16:56:11 +08:00
parent ec943578b2
commit f2b6f3d4d1
133 changed files with 0 additions and 0 deletions
@@ -0,0 +1,37 @@
import DatetimePicker from '..';
import { mount } from '../../../test';
test('confirm & cancel event', () => {
const onConfirm = jest.fn();
const onCancel = jest.fn();
const wrapper = mount(DatetimePicker, {
listeners: {
confirm: onConfirm,
cancel: onCancel,
},
});
wrapper.find('.van-picker__confirm').trigger('click');
expect(onConfirm).toHaveBeenCalledTimes(1);
wrapper.find('.van-picker__cancel').trigger('click');
expect(onCancel).toHaveBeenCalledTimes(1);
});
test('time type', () => {
const wrapper = mount(DatetimePicker, {
propsData: {
type: 'time',
minHour: 22,
minMinute: 58,
},
});
expect(wrapper).toMatchSnapshot();
});
test('getPicker method', () => {
const wrapper = mount(DatetimePicker);
expect(wrapper.vm.getPicker()).toBeTruthy();
});