refactor(components): [icon] use JSX in Unit test (#8249)

This commit is contained in:
류한경
2022-06-14 15:55:22 +09:00
committed by GitHub
parent bf02fdf89a
commit 674f0f3ced

View File

@@ -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`)
})