mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 04:56:17 +00:00
Fixed tests
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import AsideMenu from '../../src/common/AsideMenu';
|
||||
import asideMenuCreator from '../../src/common/AsideMenu';
|
||||
|
||||
describe('<AsideMenu />', () => {
|
||||
let wrapped;
|
||||
const DeleteServerButton = () => '';
|
||||
|
||||
beforeEach(() => {
|
||||
const AsideMenu = asideMenuCreator(DeleteServerButton);
|
||||
|
||||
wrapped = shallow(<AsideMenu selectedServer={{ id: 'abc123' }} />);
|
||||
});
|
||||
afterEach(() => wrapped.unmount());
|
||||
@@ -20,6 +23,6 @@ describe('<AsideMenu />', () => {
|
||||
});
|
||||
|
||||
it('contains a button to delete server', () => {
|
||||
expect(wrapped.find('DeleteServerButton')).toHaveLength(1);
|
||||
expect(wrapped.find(DeleteServerButton)).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user