import * as React from 'react' import { render } from '@testing-library/react' import { FormSection } from '.' describe('Section component', () => { it('Should render section header', () => { const { getByLabelText } = render( ... ) expect(getByLabelText('This is the label')).toBeInTheDocument() }) })