element-plus/packages/components/icon/__tests__/icon.spec.ts
2021-09-22 00:46:23 +08:00

16 lines
408 B
TypeScript

import { mount } from '@vue/test-utils'
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`)
})
})