mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-23 18:04:12 +08:00
24 lines
612 B
JavaScript
24 lines
612 B
JavaScript
import React from 'react';
|
|
import { mount } from 'enzyme';
|
|
import Search from '../Search';
|
|
import Button from '../../button';
|
|
import focusTest from '../../../tests/shared/focusTest';
|
|
|
|
describe('Input.Search', () => {
|
|
focusTest(Search);
|
|
|
|
it('should support custom button', () => {
|
|
const wrapper = mount(
|
|
<Search enterButton={<button>ok</button>} />
|
|
);
|
|
expect(wrapper.render()).toMatchSnapshot();
|
|
});
|
|
|
|
it('should support custom Button', () => {
|
|
const wrapper = mount(
|
|
<Search enterButton={<Button>ok</Button>} />
|
|
);
|
|
expect(wrapper.render()).toMatchSnapshot();
|
|
});
|
|
});
|