import { mount } from '@vue/test-utils'; import { Icon } from '../../dist/offline'; const iconDataWithID = { body: '', width: 128, height: 128, }; describe('Replacing IDs', () => { test('default behavior', () => { const Wrapper = { components: { Icon }, template: ``, data() { return { icon: iconDataWithID, }; }, }; const wrapper = mount(Wrapper, {}); expect(wrapper.html()).not.toContain('ssvg-id-1st-place-medala'); }); test('custom generator', () => { const Wrapper = { components: { Icon }, template: ``, data() { return { icon: iconDataWithID, }; }, }; const wrapper = mount(Wrapper, {}); expect(wrapper.html()).toContain('id="test-0"'); }); });