2018-08-06 22:16:36 +02:00
|
|
|
import React from 'react';
|
|
|
|
import renderer from 'react-test-renderer';
|
|
|
|
import { MemoryRouter } from 'react-router-dom';
|
2022-05-02 12:52:33 +02:00
|
|
|
import Footer from './Footer';
|
2022-05-02 15:52:41 +02:00
|
|
|
import { ThemeProvider } from 'themes/ThemeProvider';
|
2018-08-06 22:16:36 +02:00
|
|
|
|
|
|
|
test('should render DrawerMenu', () => {
|
|
|
|
const tree = renderer.create(
|
2022-05-02 15:52:41 +02:00
|
|
|
<ThemeProvider>
|
2022-02-02 12:32:30 +01:00
|
|
|
<MemoryRouter>
|
|
|
|
<Footer />
|
|
|
|
</MemoryRouter>
|
|
|
|
</ThemeProvider>
|
2018-08-06 22:16:36 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
expect(tree).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('should render DrawerMenu with "features" selected', () => {
|
|
|
|
const tree = renderer.create(
|
2022-05-02 15:52:41 +02:00
|
|
|
<ThemeProvider>
|
2022-02-02 12:32:30 +01:00
|
|
|
<MemoryRouter initialEntries={['/features']}>
|
|
|
|
<Footer />
|
|
|
|
</MemoryRouter>
|
|
|
|
</ThemeProvider>
|
2018-08-06 22:16:36 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
expect(tree).toMatchSnapshot();
|
|
|
|
});
|