ant-design/components/transfer/__tests__/search.test.js

16 lines
361 B
JavaScript
Raw Normal View History

2016-12-14 14:48:09 +08:00
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={''} />);
2017-04-02 18:09:23 +08:00
expect(wrapper).toMatchSnapshot();
2016-12-14 14:48:09 +08:00
wrapper.setProps({ value: 'a' });
2017-04-02 18:09:23 +08:00
expect(wrapper).toMatchSnapshot();
2016-12-14 14:48:09 +08:00
});
});