You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

24 lines
796 B

import React from 'react';
import { mount, render } from 'enzyme';
import moment from 'moment';
import { MonthPicker, WeekPicker } from '../';
describe('MonthPicker and WeekPicker', () => {
it('render MonthPicker', () => {
const birthday = moment('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
const wrapper = mount(
<MonthPicker open />
);
wrapper.setProps({ value: birthday });
expect(render(wrapper.find('Trigger').node.getComponent())).toMatchSnapshot();
});
it('render WeekPicker', () => {
const birthday = moment('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
const wrapper = mount(
<WeekPicker open />
);
wrapper.setProps({ value: birthday });
expect(render(wrapper.find('Trigger').node.getComponent())).toMatchSnapshot();
});
});