blob: ffd4e2db189ecbc9d651c265e47c7957664d7aa3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import { describe, expect, it } from '@jest/globals';
import { render, screen as rtlScreen } from '@testing-library/react';
import { Main } from './main';
describe('Main', () => {
it('renders the contents of the main element', () => {
const children = 'The main content.';
render(<Main>{children}</Main>);
expect(rtlScreen.getByRole('main')).toHaveTextContent(children);
});
});
|