icon.test.tsx 413 B

1234567891011
  1. import { mount } from '@vue/test-utils'
  2. import { describe, expect, test } from 'vitest'
  3. import Icon from '../src/icon.vue'
  4. describe('Icon.vue', () => {
  5. test('render', () => {
  6. const wrapper = mount(() => <Icon color="#000000" size={18} />)
  7. expect(wrapper.element.getAttribute('style')).toContain(`--color: #000000`)
  8. expect(wrapper.element.getAttribute('style')).toContain(`font-size: 18px`)
  9. })
  10. })