1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-28 17:55:15 +02:00
unleash.unleash/frontend/src/component/menu/__tests__/footer-test.jsx
ivaosthu 59bcabe331 fix(router): Upgrade to react-router v. 4.x.
This is rather big change to react-router and
required a lot of rewrites.

Mostly followed this guide:
https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/guides/migrating.md
2018-08-07 12:50:28 +02:00

28 lines
638 B
JavaScript

import React from 'react';
import renderer from 'react-test-renderer';
import { MemoryRouter } from 'react-router-dom';
import { FooterMenu } from '../footer';
jest.mock('react-mdl');
test('should render DrawerMenu', () => {
const tree = renderer.create(
<MemoryRouter>
<FooterMenu />
</MemoryRouter>
);
expect(tree).toMatchSnapshot();
});
test('should render DrawerMenu with "features" selected', () => {
const tree = renderer.create(
<MemoryRouter initialEntries={['/features']}>
<FooterMenu />
</MemoryRouter>
);
expect(tree).toMatchSnapshot();
});