2018-08-06 22:16:36 +02:00
|
|
|
import React from 'react';
|
|
|
|
import renderer from 'react-test-renderer';
|
|
|
|
import { MemoryRouter } from 'react-router-dom';
|
|
|
|
|
2021-03-30 15:14:02 +02:00
|
|
|
import Footer from '../Footer/Footer';
|
2018-08-06 22:16:36 +02:00
|
|
|
|
2021-03-30 15:14:02 +02:00
|
|
|
jest.mock('@material-ui/core');
|
2018-08-06 22:16:36 +02:00
|
|
|
|
|
|
|
test('should render DrawerMenu', () => {
|
|
|
|
const tree = renderer.create(
|
|
|
|
<MemoryRouter>
|
2021-03-30 15:14:02 +02:00
|
|
|
<Footer />
|
2018-08-06 22:16:36 +02:00
|
|
|
</MemoryRouter>
|
|
|
|
);
|
|
|
|
|
|
|
|
expect(tree).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('should render DrawerMenu with "features" selected', () => {
|
|
|
|
const tree = renderer.create(
|
|
|
|
<MemoryRouter initialEntries={['/features']}>
|
2021-03-30 15:14:02 +02:00
|
|
|
<Footer />
|
2018-08-06 22:16:36 +02:00
|
|
|
</MemoryRouter>
|
|
|
|
);
|
|
|
|
|
|
|
|
expect(tree).toMatchSnapshot();
|
|
|
|
});
|