ant-design/components/date-picker/__tests__/WeekPicker.test.js
Tom Xu b7e877aeef
refactor(slider): rewrite with hook (#23474)
* refactor(slider): rewrite with hook

* improve test

* Revert "improve test"

This reverts commit 48cd83d0ccc1089cee06f5e4959b434857bb116a.

* improve test

* improve test 2
2020-04-22 15:58:57 +08:00

25 lines
587 B
JavaScript

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