blob: 088e8ad8b91db4645cb1b48c4a49d5e7c5b07925 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { describe, expect, it } from '@jest/globals';
import { render, screen as rtlScreen } from '@testing-library/react';
import { Fieldset } from '../fieldset';
import { Legend } from './legend';
describe('legend', () => {
it('renders the fieldset legend', () => {
const body = 'deserunt';
render(
<Fieldset>
<Legend>{body}</Legend>
</Fieldset>
);
expect(rtlScreen.getByRole('group')).toHaveTextContent(body);
});
});
|