Sha256: af4ee6b1416b5b6228323be478b236634d5cbf629810ff49d240ace44325e07d
Contents?: true
Size: 865 Bytes
Versions: 87
Compression:
Stored size: 865 Bytes
Contents
import React from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import { Table } from 'react-bootstrap'; import ContentDetailInfo from '../ContentDetailInfo'; jest.mock('foremanReact/components/Pagination/PaginationWrapper', () => (<div>Pagination Mock</div>)); describe('Content Details Info', () => { it('should render and contain appropriate components', async () => { const displayMap = new Map([ ['dummy_name', 'Name'], ['dummy_details_field', 'Details Field'], ]); const detailInfo = { dummy_name: 'dummy name', dummy_details_field: 'dummy details', }; const wrapper = shallow(<ContentDetailInfo contentDetails={detailInfo} displayMap={displayMap} />); expect(toJson(wrapper)).toMatchSnapshot(); expect(wrapper.find(Table)).toHaveLength(1); }); });
Version data entries
87 entries across 87 versions & 1 rubygems