2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-05 15:52:27 +03:00

test: fix the input trigger

This commit is contained in:
mengxiong10
2019-11-10 22:34:11 +08:00
parent 73ef846a86
commit 657c23eeab
+2 -7
View File
@@ -16,7 +16,7 @@ describe('DatePicker', () => {
expect(wrapper.find('.mx-datepicker-popup').exists()).toBe(false);
// expect click input should show the popup
const input = wrapper.find('input');
input.trigger('click');
input.trigger('mousedown');
expect(wrapper.find('.mx-datepicker-popup').exists()).toBe(true);
// expect click out side should hide the popup
const bodyWrapper = createWrapper(document.body);
@@ -176,12 +176,7 @@ describe('DatePicker', () => {
expect(vm.text).toBe('2019/10/20');
vm.emitValue(emitValue);
const emitted = wrapper.emitted();
expect(emitted.input).toEqual([
[emitValue],
['2019/10/22'],
[emitValue.getTime()],
['22/10/2019'],
]);
expect(emitted.input).toEqual([[emitValue], ['2019/10/22'], [emitValue.getTime()], ['22/10/2019']]);
});
it('prop: shortcut', () => {