bigbuffet-rw/app/soapbox/components/ui/icon/__tests__/svg-icon.test.tsx
marcin mikołajczak 785c6b57e3 RTL support, use Stack and HStack in more places
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-11-25 18:04:11 +01:00

15 lines
543 B
TypeScript

import React from 'react';
import { render, screen } from '../../../../jest/test-helpers';
import SvgIcon from '../svg-icon';
describe('<SvgIcon />', () => {
it('renders loading element with default size', () => {
render(<SvgIcon className='text-primary-500' src={require('@tabler/icons/code.svg')} />);
const svg = screen.getByTestId('svg-icon-loader');
expect(svg.getAttribute('width')).toBe('24');
expect(svg.getAttribute('height')).toBe('24');
expect(svg.getAttribute('class')).toBe('text-primary-500');
});
});