import { describe, it, expect } from 'vitest' import { render } from '@testing-library/react' import { Subheader } from './subheader' describe('', () => { it('renders children inside a Box', () => { const { getByText } = render( left right , ) expect(getByText('left')).toBeTruthy() expect(getByText('right')).toBeTruthy() }) it('merges caller-supplied sx onto the root', () => { const { container } = render( x , ) expect(container.firstChild).not.toBeNull() // Class-based assertions are brittle; settle for "an element renders + a // single child slot exists" — sx forwarding gets exercised at the // import/MUI level so we don't need to inspect emotion-generated class // names. expect(container.querySelectorAll('span').length).toBe(1) }) })