fix(Button): icon-prefix prop not work (#5947)

This commit is contained in:
neverland
2020-03-30 17:16:07 +08:00
committed by GitHub
parent 6ce940d0db
commit da8212be7d
5 changed files with 21 additions and 4 deletions
+12 -1
View File
@@ -1,7 +1,7 @@
import { mount } from '../../../test';
import Button from '..';
test('loading size', () => {
test('loading-size prop', () => {
const wrapper = mount(Button, {
propsData: {
loading: true,
@@ -82,3 +82,14 @@ test('hide border when color is gradient', () => {
expect(wrapper.element.style.border).toEqual('0px');
});
test('icon-prefix prop', () => {
const wrapper = mount(Button, {
propsData: {
icon: 'success',
iconPrefix: 'my-icon',
},
});
expect(wrapper).toMatchSnapshot();
});