import React from 'react'; import ReactDOM from 'react-dom'; import { mount } from 'enzyme'; import ListNavigation from '.'; const example = 'example'; const wrapper = {example}; const wrapperMultiple = ( {example} {example} ); describe('ListNavigation', () => { it('renders without crashing', () => { const div = document.createElement('div'); ReactDOM.render({example}, div); }); it('should render an unordered list', () => { const output = mount(wrapper); expect(output.find('ul')).toHaveLength(1); expect(mount(wrapperMultiple).find('ul li')).toHaveLength(2); }); it('matches wrapper snapshot', () => { expect(mount(Example)).toMatchSnapshot('wrapper mount'); }); });