Skip to content

Commit 210ecf2

Browse files
committed
fix date-range-picker tests
1 parent 543e499 commit 210ecf2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/date-range-picker/__tests__/date-range-picker-absolute.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const defaultProps: DateRangePickerProps = {
2626
const outsideId = 'outside';
2727
function renderDateRangePicker(props: DateRangePickerProps = defaultProps) {
2828
const ref = React.createRef<HTMLInputElement>();
29+
console.log(props);
2930
const { container, getByTestId, rerender } = render(
3031
<div>
3132
<button data-testid={outsideId} />
@@ -884,7 +885,7 @@ describe('Date range picker', () => {
884885
expect(wrapper.findTrigger().getElement()).toHaveTextContent('2018-01 — 2018-01');
885886
});
886887

887-
test('date-only has no effect on saving', () => {
888+
testIf(granularity === 'month')('date-only has no effect on saving', () => {
888889
const onChangeSpy = jest.fn();
889890
const { wrapper } = renderDateRangePicker({
890891
...defaultProps,
@@ -905,7 +906,7 @@ describe('Date range picker', () => {
905906
});
906907
});
907908

908-
test('date-only range is saved without time part', () => {
909+
testIf(granularity === 'day')('date-only range is saved without time part', () => {
909910
const onChangeSpy = jest.fn();
910911
const { wrapper } = renderDateRangePicker({
911912
...defaultProps,

0 commit comments

Comments
 (0)