Sha256: f581fde067dcad9a558e9e3d59774c16841d0867d41bf5ff6c2d3f415b17b774
Contents?: true
Size: 641 Bytes
Versions: 49
Compression:
Stored size: 641 Bytes
Contents
import React from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import { mock as mockApi } from '../../mockRequest'; import Search from '../Search/Search'; describe('Search component', () => { const getBaseProps = () => ({ onSearch: () => {}, getAutoCompleteParams: () => ({ endpoint: '/fake' }), loadSetting: jest.fn(), }); describe('rendering', () => { it('renders correctly', () => { mockApi.onGet('/katello/api/v2/fake').reply(200, []); const component = shallow(<Search {...getBaseProps()} />); expect(toJson(component)).toMatchSnapshot(); }); }); });
Version data entries
49 entries across 49 versions & 1 rubygems