Fixed tests

This commit is contained in:
Alejandro Celaya
2020-03-05 11:58:35 +01:00
parent dbee62ac8c
commit c181831a37
4 changed files with 9 additions and 17 deletions

View File

@@ -1,6 +1,5 @@
import { shallow } from 'enzyme';
import React from 'react';
import { NavLink } from 'react-router-dom';
import asideMenuCreator from '../../src/common/AsideMenu';
describe('<AsideMenu />', () => {
@@ -15,7 +14,7 @@ describe('<AsideMenu />', () => {
afterEach(() => wrapped.unmount());
it('contains links to different sections', () => {
const links = wrapped.find(NavLink);
const links = wrapped.find('[to]');
expect(links).toHaveLength(3);
links.forEach((link) => expect(link.prop('to')).toContain('abc123'));