UNPKG

quickbuild

Version:

A mature, feature-complete application generator with an emphasis on speed

28 lines (24 loc) 824 B
import React from 'react'; import { render } from 'react-testing-library'; import { Provider } from 'react-redux'; import { IntlProvider } from 'react-intl'; import { ConnectedRouter } from 'connected-react-router/immutable'; import { createMemoryHistory } from 'history'; import Header from '../index'; import configureStore from '../../../configureStore'; describe('<Header />', () => { const history = createMemoryHistory(); const store = configureStore({}, history); it('should render a div', () => { const { container } = render( <Provider store={store}> <IntlProvider locale="en"> <ConnectedRouter history={history}> <Header /> </ConnectedRouter> </IntlProvider> </Provider>, ); expect(container.firstChild).toMatchSnapshot(); }); });