import React from 'react'; import ReactTestRenderer from 'react-test-renderer'; import { MemoryRouter } from 'react-router-dom'; import { Provider } from 'react-redux'; import configureStore from 'redux-mock-store'; import { AccountNotificationsPage } from './notifications.page'; import { createNotifications } from 'app/testUtils/mocks/notifications.mock'; describe('Account notifications page tests', () => { const initialState = { user: { current: {}, data:{}, updating: false, }, notifications: { collection: createNotifications(), }, }; const mockStore = configureStore(); let store; beforeEach(() => { store = mockStore(initialState); }); it('renders page correctly', () => { const tree = ReactTestRenderer .create( ) .toJSON(); expect(tree).toMatchSnapshot(); }); });