2022-04-10 10:56:15 -07:00
|
|
|
import * as React from 'react';
|
|
|
|
|
|
|
|
import { render, screen } from '../../../../jest/test-helpers';
|
|
|
|
import SvgIcon from '../svg-icon';
|
|
|
|
|
|
|
|
describe('<SvgIcon />', () => {
|
|
|
|
it('renders loading element with default size', () => {
|
2022-07-09 09:20:02 -07:00
|
|
|
render(<SvgIcon className='text-primary-500' src={require('@tabler/icons/code.svg')} />);
|
2022-04-10 10:56:15 -07:00
|
|
|
|
|
|
|
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');
|
|
|
|
});
|
|
|
|
});
|