mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
TopbarDesktop.test: remove routeConfiguration and RoutesProvider
This commit is contained in:
parent
399ec5f3e7
commit
a601974407
1 changed files with 1 additions and 9 deletions
|
|
@ -1,9 +1,6 @@
|
|||
import React from 'react';
|
||||
import { fakeIntl } from '../../util/test-data';
|
||||
import { renderDeep } from '../../util/test-helpers';
|
||||
import { RoutesProvider } from '../../components';
|
||||
import routeConfiguration from '../../routeConfiguration';
|
||||
import { flattenRoutes } from '../../util/routes';
|
||||
import TopbarDesktop from './TopbarDesktop';
|
||||
|
||||
const noop = () => null;
|
||||
|
|
@ -11,7 +8,6 @@ const noop = () => null;
|
|||
describe('TopbarDesktop', () => {
|
||||
it('data matches snapshot', () => {
|
||||
window.google = { maps: {} };
|
||||
const flattenedRoutes = flattenRoutes(routeConfiguration());
|
||||
const topbarProps = {
|
||||
isAuthenticated: true,
|
||||
currentUserHasListings: true,
|
||||
|
|
@ -20,11 +16,7 @@ describe('TopbarDesktop', () => {
|
|||
intl: fakeIntl,
|
||||
onLogout: noop,
|
||||
};
|
||||
const tree = renderDeep(
|
||||
<RoutesProvider flattenedRoutes={flattenedRoutes}>
|
||||
<TopbarDesktop {...topbarProps} />
|
||||
</RoutesProvider>
|
||||
);
|
||||
const tree = renderDeep(<TopbarDesktop {...topbarProps} />);
|
||||
delete window.google;
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue