import { shallow } from 'enzyme' import React from 'react' import AsideMenu from '../../src/common/AsideMenu' import { NavLink } from 'react-router-dom'; describe('', () => { let wrapped; beforeEach(() => { wrapped = shallow(); }); afterEach(() => { wrapped.unmount(); }); it('contains links to different sections', () => { const links = wrapped.find(NavLink); expect(links).toHaveLength(3); links.forEach(link => expect(link.prop('to')).toContain('abc123')); }); it('contains a button to delete server', () => { expect(wrapped.find('DeleteServerButton')).toHaveLength(1); }); });