import React from 'react'; import { InlineIcon } from '../../dist/offline'; import { describe, test, expect } from 'vitest'; import { render } from '@testing-library/react'; const iconData = { body: '', width: 24, height: 24, }; describe('Dimensions', () => { test('height', () => { const renderResult = render(); expect(renderResult.container.innerHTML).toContain( 'width="48" height="48"' ); expect(renderResult.container.innerHTML).not.toContain('1em'); }); test('width and height', () => { const renderResult = render( ); expect(renderResult.container.innerHTML).toContain( 'width="32" height="48"' ); expect(renderResult.container.innerHTML).not.toContain('1em'); }); test('auto', () => { const renderResult = render( ); expect(renderResult.container.innerHTML).toContain( 'width="24" height="24"' ); expect(renderResult.container.innerHTML).not.toContain('1em'); }); test('unset', () => { const renderResult = render( ); expect(renderResult.container.innerHTML).not.toContain('width='); expect(renderResult.container.innerHTML).not.toContain('height='); }); });