import { render } from '~/src/utils/test' import { Center } from './Center' import { type CenterProps } from './Center.types' import styles from './Center.module.scss' const CONTENT = 'Centered content' describe('Center', () => { const renderComponent = ({ children, ...rest }: CenterProps) => render(
{children}
) it('should have a centered style', () => { const { getByText } = renderComponent({ children: CONTENT }) const rendered = getByText(CONTENT) expect(rendered).toHaveClass(styles.Center) }) })