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('Rotation', () => { test('number', () => { const renderResult = render(); expect(renderResult.container.innerHTML).toContain( '' ); }); test('string', () => { const renderResult = render( // @ts-expect-error ); expect(renderResult.container.innerHTML).toContain( '' ); }); }); describe('Flip', () => { test('boolean', () => { const renderResult = render( ); expect(renderResult.container.innerHTML).toContain( '' ); }); test('string', () => { const renderResult = render( ); expect(renderResult.container.innerHTML).toContain( '' ); }); test('string and boolean', () => { const renderResult = render( ); // horizontal + vertical = 180deg rotation expect(renderResult.container.innerHTML).toContain( '' ); expect(renderResult.container.innerHTML).not.toContain('scale'); }); test('string for boolean attribute', () => { const renderResult = render( // @ts-expect-error ); expect(renderResult.container.innerHTML).toContain( '' ); }); test('shorthand and boolean', () => { // 'flip' is processed after 'hFlip' because of order of elements in object, overwriting value const renderResult = render( ); expect(renderResult.container.innerHTML).toContain( '' ); }); test('shorthand and boolean as string', () => { const renderResult = render( // @ts-expect-error ); // horizontal + vertical = 180deg rotation expect(renderResult.container.innerHTML).toContain( '' ); expect(renderResult.container.innerHTML).not.toContain('scale'); }); test('wrong case', () => { const renderResult = render( // @ts-expect-error ); expect(renderResult.container.innerHTML).not.toContain('transform'); }); });