[new feature] Icon: add tag prop (#2986)

This commit is contained in:
neverland
2019-03-17 18:48:18 +08:00
committed by GitHub
parent 36fc3ab921
commit 94a7445945
10 changed files with 56 additions and 18 deletions
@@ -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>
`;
+9
View File
@@ -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();
});