import { render, screen } from '../test-utils'; import Section from '.'; describe('Section', () => { it('can render children', () => { render(
Children here
); expect(screen.getByText('Children here')).toBeInTheDocument(); }); it('passes `id` to the element', () => { render(
Children here
); expect(screen.getByText('Children here')).toHaveAttribute('id', 'section-id'); }); it('renders `Section.Header`', () => { render(
, ); expect(screen.getByRole('heading', { name: 'Section title' })).toBeInTheDocument(); }); });