import React from 'react'; import { render, screen, within } from '@testing-library/react'; import { Provider } from 'react-redux'; import configureStore from '../../../src/app/stores/windowStore'; import App from '../../../src/app/containers/App'; Object.defineProperty(window, 'matchMedia', { writable: true, value: jest.fn().mockImplementation((query) => ({ matches: false, media: query, onchange: null, addListener: jest.fn(), // deprecated removeListener: jest.fn(), // deprecated addEventListener: jest.fn(), removeEventListener: jest.fn(), dispatchEvent: jest.fn(), })), }); const { store } = configureStore(store); describe('App container', () => { it("should render inspector monitor's component", () => { render( ); expect(screen.getByTestId('inspector')).toBeDefined(); }); it('should contain an empty action list', () => { render( ); const actionList = screen.getByTestId('actionList'); expect( within(actionList).getByTestId('actionListRows') ).toBeEmptyDOMElement(); }); });