ant-design/components/date-picker/__tests__/WeekPicker.test.tsx
lijianan 8010cd19b6
test: migrate part of DatePicker tests (#37115)
* 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
2022-08-18 17:40:47 +08:00

24 lines
574 B
TypeScript

import React from 'react';
import DatePicker from '..';
import focusTest from '../../../tests/shared/focusTest';
import { render, resetMockDate, setMockDate } from '../../../tests/utils';
const { WeekPicker } = DatePicker;
describe('WeekPicker', () => {
beforeEach(() => {
setMockDate();
});
afterEach(() => {
resetMockDate();
});
focusTest(WeekPicker, { refFocus: true });
it('should support style prop', () => {
const { container } = render(<WeekPicker style={{ width: 400 }} />);
expect(container.firstChild).toMatchSnapshot();
});
});