mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 00:09:39 +08:00
8010cd19b6
* test: migrate part of DatePicker tests * test: migrate part of DatePicker tests * fix: update snap * test: migrate part of DatePicker tests * test: migrate part of DatePicker tests * test: migrate part of DatePicker tests * test: migrate part of DatePicker tests * test: migrate part of DatePicker tests * test: migrate part of DatePicker tests * test: remove useless methods * test: add test ignore
23 lines
688 B
TypeScript
23 lines
688 B
TypeScript
import React from 'react';
|
|
import DatePicker from '..';
|
|
import { render } from '../../../tests/utils';
|
|
import { resetWarned } from '../../_util/warning';
|
|
|
|
const { QuarterPicker } = DatePicker;
|
|
|
|
describe('QuarterPicker', () => {
|
|
it('should support style prop', () => {
|
|
resetWarned();
|
|
const warnSpy = jest.spyOn(console, 'error');
|
|
|
|
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();
|
|
});
|
|
});
|