diff --git a/src/ui/Footer/Footer.stories.test.js b/src/ui/Footer/Footer.stories.test.js index c028acb8c..0cdbd518a 100644 --- a/src/ui/Footer/Footer.stories.test.js +++ b/src/ui/Footer/Footer.stories.test.js @@ -3,8 +3,10 @@ import { render } from '@testing-library/react'; import { createMemoryHistory } from 'history'; import { Router } from 'react-router-dom'; import { Default } from './Footer.stories'; +import { Provider } from 'react-redux'; import Footer from './Footer'; import '@testing-library/jest-dom/extend-expect'; +import configureStore from 'redux-mock-store'; describe('Default', () => { let history; @@ -22,11 +24,21 @@ describe('Default', () => { }); }); + const mockStore = configureStore(); + const store = mockStore({ + intl: { + locale: 'en', + messages: {}, + }, + }); + it('renders correctly', () => { const { container } = render( - - - , + + + + + , ); expect(container.querySelector('#footer')).toBeInTheDocument(); @@ -49,21 +61,23 @@ describe('Default', () => { it('renders correctly', () => { const { container, getByText } = render( - - - , + + + + + , ); expect(container.querySelector('#footer')).toBeInTheDocument(); @@ -82,23 +96,25 @@ describe('Default', () => { it('renders correctly', () => { const { container, getByText } = render( - - - , + + + + + , ); expect(container.querySelector('#footer')).toBeInTheDocument();