import { render, screen } from '@tests/utils'; import Main from './main'; const id = 'main'; const children = 'The main content.'; describe('Main', () => { it('renders the content of main element', () => { render(
{children}
); expect(screen.getByRole('main')).toHaveTextContent(children); }); }); nd.philippot.eu/www.armandphilippot.com' title='www.armandphilippot.com Git repository'/>
summaryrefslogtreecommitdiffstats
path: root/jest.setup.js
blob: d2710ea01e0a2c8e139e4ab34a0466168f50130c (plain)
1
2
3
4
5
import '@testing-library/jest-dom/extend-expect';
import '@tests/jest/__mocks__/matchMedia.mock';

jest.mock('next/dist/client/router', () => require('next-router-mock'));
jest.mock('next/dynamic', () => () => 'dynamic-import');