[new feature] Icon: add tag prop (#2986)
This commit is contained in:
@@ -14,3 +14,9 @@ exports[`render icon with url name 1`] = `
|
||||
<i class="van-icon van-icon--image"><img src="https://img.yzcdn.com/icon.jpg">
|
||||
<!----></i>
|
||||
`;
|
||||
|
||||
exports[`tag prop 1`] = `
|
||||
<div class="van-icon van-icon-undefined">
|
||||
<!---->
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -27,3 +27,12 @@ test('render icon default slot', () => {
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('tag prop', () => {
|
||||
const wrapper = mount(Icon, {
|
||||
propsData: {
|
||||
tag: 'div'
|
||||
}
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user