Add tests for Input.Search

This commit is contained in:
ztplz 2018-11-16 20:05:04 +08:00 committed by 偏右
parent d1e8dd7504
commit 7180f6be44

View File

@ -21,6 +21,15 @@ describe('Input.Search', () => {
expect(wrapper.render()).toMatchSnapshot();
});
it('should support ReactNode suffix without error', () => {
const fn = () => {
mount(
<Search suffix={<div>ok</div>} />
);
};
expect(fn).not.toThrow();
});
it('should disable enter button when disabled prop is true', () => {
const wrapper = mount(
<Search placeholder="input search text" enterButton disabled />