ant-design/components/date-picker/__tests__/WeekPicker.test.tsx

24 lines
574 B
TypeScript
Raw Normal View History

2022-06-22 14:57:09 +08:00
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', () => {
2018-12-28 10:50:17 +08:00
beforeEach(() => {
setMockDate();
});
afterEach(() => {
resetMockDate();
});
focusTest(WeekPicker, { refFocus: true });
2018-03-29 18:03:14 +08:00
it('should support style prop', () => {
const { container } = render(<WeekPicker style={{ width: 400 }} />);
expect(container.firstChild).toMatchSnapshot();
2018-03-29 18:03:14 +08:00
});
});