import React from 'react'; import { Icon } from '../../dist/offline'; import { describe, test, expect } from 'vitest'; import { render } from '@testing-library/react'; const iconDataWithID = { body: '', width: 128, height: 128, }; describe('Replacing IDs', () => { test('default behavior', () => { const renderResult = render(); expect(renderResult.container.innerHTML).not.toContain( 'ssvg-id-1st-place-medal' ); }); test('custom generator', () => { const renderResult = render(); expect(renderResult.container.innerHTML).not.toContain( 'ssvg-id-1st-place-medal' ); expect(renderResult.container.innerHTML).toContain('id="testID0"'); expect(renderResult.container.innerHTML).toContain('id="testID10"'); }); });