1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/frontend/src/component/menu/__tests__/footerTest.jsx

32 lines
843 B
React
Raw Normal View History

import React from 'react';
import renderer from 'react-test-renderer';
import { MemoryRouter } from 'react-router-dom';
import { ThemeProvider } from '@material-ui/core';
import Footer from '../Footer/Footer';
2022-03-28 10:49:59 +02:00
import theme from 'themes/mainTheme';
test('should render DrawerMenu', () => {
const tree = renderer.create(
<ThemeProvider theme={theme}>
<MemoryRouter>
<Footer />
</MemoryRouter>
</ThemeProvider>
);
expect(tree).toMatchSnapshot();
});
test('should render DrawerMenu with "features" selected', () => {
const tree = renderer.create(
<ThemeProvider theme={theme}>
<MemoryRouter initialEntries={['/features']}>
<Footer />
</MemoryRouter>
</ThemeProvider>
);
expect(tree).toMatchSnapshot();
});