/* eslint-disable jest/require-top-level-describe */
import { render } from '@testing-library/react';
import React from 'react';
import { SIZES, COLORS } from '../../../helpers/constants/design-system';
import { BaseIcon } from './base-icon';
describe('BaseIcon', () => {
it('should render correctly', () => {
const { getByTestId, container } = render(
,
);
expect(getByTestId('base-icon')).toBeDefined();
expect(container.querySelector('svg')).toBeDefined();
});
it('should render with different size classes', () => {
const { getByTestId } = render(
<>
>,
);
expect(getByTestId('base-icon-xxs')).toHaveClass('base-icon--size-xxs');
expect(getByTestId('base-icon-xs')).toHaveClass('base-icon--size-xs');
expect(getByTestId('base-icon-sm')).toHaveClass('base-icon--size-sm');
expect(getByTestId('base-icon-md')).toHaveClass('base-icon--size-md');
expect(getByTestId('base-icon-lg')).toHaveClass('base-icon--size-lg');
expect(getByTestId('base-icon-xl')).toHaveClass('base-icon--size-xl');
});
it('should render with icon colors', () => {
const { getByTestId } = render(
<>
>,
);
expect(getByTestId('base-icon-color-inherit')).toHaveClass(
'box--color-inherit',
);
expect(getByTestId('base-icon-color-default')).toHaveClass(
'box--color-icon-default',
);
expect(getByTestId('base-icon-color-alternative')).toHaveClass(
'box--color-icon-alternative',
);
expect(getByTestId('base-icon-color-muted')).toHaveClass(
'box--color-icon-muted',
);
});
});