element-plus/packages/components/icon/__tests__/icon.test.ts
三咲智子 1d13ebb05d
feat: drop jest (#7248)
* feat: drop jest

* test: remove ssr

* test: rename

* chore: update tsconfig
2022-04-19 16:51:44 +08:00

17 lines
454 B
TypeScript

import { mount } from '@vue/test-utils'
import { describe, expect, test } from 'vitest'
import Icon from '../src/icon.vue'
describe('Icon.vue', () => {
test('render', () => {
const wrapper = mount(Icon, {
props: {
color: '#000000',
size: 18,
},
})
expect(wrapper.element.getAttribute('style')).toContain(`--color: #000000`)
expect(wrapper.element.getAttribute('style')).toContain(`font-size: 18px`)
})
})