From 8ae955fdbd29ea415460734136e8ea101c65f0c8 Mon Sep 17 00:00:00 2001 From: Mohammed Ali Chherawalla Date: Sat, 7 Mar 2020 23:59:33 +0400 Subject: [PATCH] Update testUtils.js.hbs --- generators/testUtil/testUtils.js.hbs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/generators/testUtil/testUtils.js.hbs b/generators/testUtil/testUtils.js.hbs index 7c3493b..954bd8a 100644 --- a/generators/testUtil/testUtils.js.hbs +++ b/generators/testUtil/testUtils.js.hbs @@ -5,7 +5,7 @@ import { Provider } from 'react-redux' import configureStore from '@app/configureStore' import { DEFAULT_LOCALE, translationMessages } from '@app/i18n' import ConnectedLanguageProvider from '@containers/LanguageProvider' -import { browserHistory } from 'react-router-dom' +import { BrowserRouter as Router, browserHistory } from 'react-router-dom' import { ThemeProvider } from 'styled-components' export const timeout = ms => new Promise(resolve => setTimeout(resolve, ms)) @@ -45,4 +45,7 @@ export const getComponentStyles = (Component, props = {}) => { const componentRoots = document.getElementsByClassName(styledComponentId) // eslint-disable-next-line no-underscore-dangle return window.getComputedStyle(componentRoots[0])._values -} \ No newline at end of file +} + +export const renderWithRouterAndIntl = children => + renderWithIntl({children});