Skip to content

Commit 190abe6

Browse files
author
刘欢
committed
feat: add test to multiple picker
1 parent 04eb328 commit 190abe6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/multiple.spec.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { fireEvent, render } from '@testing-library/react';
33
import { resetWarned } from '@rc-component/util/lib/warning';
44
import React from 'react';
5-
import { DayPicker, getDay, isOpen, openPicker, selectCell } from './util/commonUtil';
5+
import { clearValue, DayPicker, getDay, isOpen, openPicker, selectCell } from './util/commonUtil';
66

77
const fakeTime = getDay('1990-09-03 00:00:00').valueOf();
88

@@ -57,6 +57,8 @@ describe('Picker.Multiple', () => {
5757
]);
5858

5959
expect(onChange.mock.calls[0][0]).toHaveLength(3);
60+
clearValue();
61+
expect(onChange).toHaveBeenCalledWith(null, null);
6062
});
6163

6264
it('panel click to remove', () => {

0 commit comments

Comments
 (0)