import React from 'react'; import { render } from '@/components/testUtils'; import { HorizontalSpacer, VerticalSpacer } from '@/components/shared/Spacers'; import { theme } from '@/app/shared/theme'; describe('[Component] Spacers', () => { test('renders Vertical correctly', () => { const component = render( ); expect(component).toMatchSnapshot(); }); test('renders HorizontalSpacer correctly', () => { const component = render( ); expect(component).toMatchSnapshot(); }); test('applies correct height for VerticalSpacer based on heightUnits', () => { const { getByTestId } = render( ); const spacer = getByTestId('vertical-spacer'); expect(spacer).toHaveStyle({ height: theme.layout.gridUnit * 3 }); }); test('applies correct width for HorizontalSpacer based on widthUnits', () => { const { getByTestId } = render( ); const spacer = getByTestId('horizontal-spacer'); expect(spacer).toHaveStyle({ width: theme.layout.gridUnit * 4 }); }); });