ant-design/tests/time-picker/index.test.js
Wei Zhu bd55d21f83 style: Fix jsx-no-multiline-js (#3994)
* Fix jsx-no-multiline-js

* TimePicker addon test

* Transfer search test
2016-11-25 12:03:39 +08:00

17 lines
593 B
JavaScript

import React from 'react';
import { mount, render } from 'enzyme';
import { renderToJson } from 'enzyme-to-json';
import RcTimePicker from 'rc-time-picker/lib/TimePicker';
import TimePicker from '../../components/time-picker';
describe('TimePicker', () => {
it('renders addon correctly', () => {
const addon = (panel) => (<button>Ok</button>);
const wrapper = mount(<TimePicker addon={addon} />);
const rcTimePicker = wrapper.find(RcTimePicker);
const addonWrapper = render(rcTimePicker.props().addon());
expect(renderToJson(addonWrapper)).toMatchSnapshot();
});
});