You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
688 B
23 lines
688 B
2 years ago
|
import React from 'react';
|
||
4 years ago
|
import DatePicker from '..';
|
||
2 years ago
|
import { render } from '../../../tests/utils';
|
||
3 years ago
|
import { resetWarned } from '../../_util/warning';
|
||
4 years ago
|
|
||
|
const { QuarterPicker } = DatePicker;
|
||
|
|
||
|
describe('QuarterPicker', () => {
|
||
|
it('should support style prop', () => {
|
||
|
resetWarned();
|
||
|
const warnSpy = jest.spyOn(console, 'error');
|
||
|
|
||
2 years ago
|
const { container } = render(<QuarterPicker style={{ width: 400 }} />);
|
||
|
expect(container.firstChild).toMatchSnapshot();
|
||
4 years ago
|
|
||
|
expect(warnSpy).toHaveBeenCalledWith(
|
||
|
"Warning: [antd: QuarterPicker] DatePicker.QuarterPicker is legacy usage. Please use DatePicker[picker='quarter'] directly.",
|
||
|
);
|
||
|
|
||
|
warnSpy.mockRestore();
|
||
|
});
|
||
|
});
|