Skip to content

Commit

Permalink
Update testUtils.js.hbs
Browse files Browse the repository at this point in the history
  • Loading branch information
alichherawalla authored Mar 7, 2020
1 parent 01ccaa3 commit 8ae955f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions generators/testUtil/testUtils.js.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
}
}

export const renderWithRouterAndIntl = children =>
renderWithIntl(<Router>{children}</Router>);

0 comments on commit 8ae955f

Please sign in to comment.