test: update listeners style

pull/2682/head
tangjinzhou 2020-07-25 21:46:52 +08:00
parent 9ab1644e1e
commit 792d2af69b
4 changed files with 8 additions and 16 deletions

View File

@ -202,9 +202,7 @@ describe('Calendar', () => {
const wrapper = mount(Calendar, {
props: {
mode: yearMode,
},
listeners: {
panelChange: onPanelChangeStub,
onPanelChange: onPanelChangeStub,
},
sync: false,
});
@ -240,9 +238,7 @@ describe('Calendar', () => {
const wrapper = mount(Calendar, {
props: {
value: date,
},
listeners: {
panelChange: onPanelChange,
onPanelChange,
},
sync: false,
});
@ -261,9 +257,7 @@ describe('Calendar', () => {
const wrapper = mount(Calendar, {
props: {
value: date,
},
listeners: {
panelChange: onPanelChange,
onPanelChange,
},
sync: false,
});

View File

@ -12,9 +12,9 @@ describe('Checkbox', () => {
const onMouseLeave = jest.fn();
const wrapper = mount(Checkbox, {
listeners: {
mouseenter: onMouseEnter,
mouseleave: onMouseLeave,
props: {
onMouseenter: onMouseEnter,
onMouseleave: onMouseLeave,
},
});

View File

@ -349,8 +349,8 @@ describe('RangePicker', () => {
const wrapper = mount(RangePicker, {
props: {
ranges: { 'recent two days': range },
onOk: handleOk,
},
listeners: { ok: handleOk },
sync: false,
attachTo: 'body',
});

View File

@ -11,13 +11,11 @@ describe('DropdownButton', () => {
disabled: false,
trigger: ['hover'],
visible: true,
onVisibleChange: () => {},
};
const wrapper = mount(Dropdown.Button, {
props,
listeners: {
visibleChange: () => {},
},
});
const dropdownProps = wrapper.find({ name: 'ADropdown' }).props();