mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
refactor(components): [icon] use JSX in Unit test (#8249)
This commit is contained in:
@@ -4,12 +4,7 @@ import Icon from '../src/icon.vue'
|
||||
|
||||
describe('Icon.vue', () => {
|
||||
test('render', () => {
|
||||
const wrapper = mount(Icon, {
|
||||
props: {
|
||||
color: '#000000',
|
||||
size: 18,
|
||||
},
|
||||
})
|
||||
const wrapper = mount(() => <Icon color="#000000" size={18} />)
|
||||
expect(wrapper.element.getAttribute('style')).toContain(`--color: #000000`)
|
||||
expect(wrapper.element.getAttribute('style')).toContain(`font-size: 18px`)
|
||||
})
|
||||
Reference in New Issue
Block a user