mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
16 lines
359 B
JavaScript
16 lines
359 B
JavaScript
import React from 'react';
|
|
import { mount } from 'enzyme';
|
|
import Search from '../search';
|
|
|
|
describe('Search', () => {
|
|
it('should show cross icon when input value exists', () => {
|
|
const wrapper = mount(<Search value="" />);
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
wrapper.setProps({ value: 'a' });
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|