add test case for RangePicker presetted ranges

This commit is contained in:
afc163 2020-04-28 16:00:04 +08:00
parent b70d607b9f
commit e4bdfb218c
2 changed files with 5332 additions and 0 deletions

View File

@ -75,4 +75,19 @@ describe('RangePicker', () => {
expect(value[0].isSame(value[1], 'date')).toBeTruthy();
});
});
describe('ranges', () => {
it('RangePicker support presetted ranges with Tags', () => {
const wrapper = mount(
<RangePicker
ranges={{
Today: [moment(), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
}}
open
/>,
);
expect(wrapper).toMatchSnapshot();
});
});
});