diff --git a/src/components/Icon/__snapshots__/icon.spec.ts.snap b/src/components/Icon/__snapshots__/icon.spec.ts.snap new file mode 100644 index 0000000..0989904 --- /dev/null +++ b/src/components/Icon/__snapshots__/icon.spec.ts.snap @@ -0,0 +1,15 @@ +// Vitest Snapshot v1 + +exports[`Icon > renders properly 1`] = ` + +`; diff --git a/src/components/Icon/icon.spec.ts b/src/components/Icon/icon.spec.ts index e69de29..f563e87 100644 --- a/src/components/Icon/icon.spec.ts +++ b/src/components/Icon/icon.spec.ts @@ -0,0 +1,28 @@ +import { describe, it, expect } from 'vitest'; + +import { mount } from '@vue/test-utils'; +import Icon from './Icon.vue'; + +describe('Icon', () => { + it('renders properly', () => { + const wrapper = mount(Icon, { + props: { + name: 'AdjustmentsIcon', + size: '24', + color: 'rgb(255, 255, 255)', + kind: 'solid', + }, + }); + expect(wrapper.exists()).toBe(true); + expect(wrapper.find('svg').exists()).toBe(true); + expect(wrapper.find('svg').element.getAttribute('aria-hidden')).toBe( + 'true' + ); + expect(wrapper.find('svg').element.getAttribute('style')).toBe( + 'color: rgb(255, 255, 255);' + ); + expect(wrapper.find('svg').element.getAttribute('fill')).toBe( + 'currentColor' + ); + }); +});