mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-25 16:58:00 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
24 lines
718 B
TypeScript
24 lines
718 B
TypeScript
import React from 'react';
|
|
|
|
import DatePicker from '..';
|
|
import { resetWarned } from '../../_util/warning';
|
|
import { render } from '../../../tests/utils';
|
|
|
|
const { QuarterPicker } = DatePicker;
|
|
|
|
describe('QuarterPicker', () => {
|
|
it('should support style prop', () => {
|
|
resetWarned();
|
|
const warnSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
|
|
|
const { container } = render(<QuarterPicker style={{ width: 400 }} />);
|
|
expect(container.firstChild).toMatchSnapshot();
|
|
|
|
expect(warnSpy).toHaveBeenCalledWith(
|
|
"Warning: [antd: QuarterPicker] DatePicker.QuarterPicker is legacy usage. Please use DatePicker[picker='quarter'] directly.",
|
|
);
|
|
|
|
warnSpy.mockRestore();
|
|
});
|
|
});
|