mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
test: add more test cases (#26362)
This commit is contained in:
parent
9b6db94fdf
commit
fbef76e943
@ -29,11 +29,13 @@ describe('Calendar', () => {
|
||||
|
||||
it('Calendar should be selectable', () => {
|
||||
const onSelect = jest.fn();
|
||||
const wrapper = mount(<Calendar onSelect={onSelect} />);
|
||||
const onChange = jest.fn();
|
||||
const wrapper = mount(<Calendar onSelect={onSelect} onChange={onChange} />);
|
||||
wrapper.find('.ant-picker-cell').at(0).simulate('click');
|
||||
expect(onSelect).toHaveBeenCalledWith(expect.anything());
|
||||
const value = onSelect.mock.calls[0][0];
|
||||
expect(Moment.isMoment(value)).toBe(true);
|
||||
expect(onChange).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('only Valid range should be selectable', () => {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -46,6 +46,7 @@ import jaJP from '../ja_JP';
|
||||
import knIN from '../kn_IN';
|
||||
import koKR from '../ko_KR';
|
||||
import kmrIQ from '../kmr_IQ';
|
||||
import kuIQ from '../ku_IQ';
|
||||
import lvLV from '../lv_LV';
|
||||
import ltLT from '../lt_LT';
|
||||
import mkMK from '../mk_MK';
|
||||
@ -103,6 +104,7 @@ const locales = [
|
||||
knIN,
|
||||
koKR,
|
||||
kmrIQ,
|
||||
kuIQ,
|
||||
ltLT,
|
||||
mkMK,
|
||||
msMY,
|
||||
|
Loading…
Reference in New Issue
Block a user