[improvement] rename packages dir to src (#3659)

This commit is contained in:
neverland
2019-06-27 11:25:57 +08:00
committed by GitHub
parent 8489918dca
commit 75c79b7044
619 changed files with 21 additions and 21 deletions
+56
View File
@@ -0,0 +1,56 @@
import Icon from '..';
import { mount } from '../../../test/utils';
test('render icon with builtin icon name', () => {
const wrapper = mount(Icon, {
propsData: {
name: 'success'
}
});
expect(wrapper).toMatchSnapshot();
});
test('render icon with url name', () => {
const wrapper = mount(Icon, {
propsData: {
name: 'https://img.yzcdn.com/icon.jpg'
}
});
expect(wrapper).toMatchSnapshot();
});
test('render icon with local image', () => {
const wrapper = mount(Icon, {
propsData: {
name: '/assets/icon.jpg'
}
});
expect(wrapper).toMatchSnapshot();
});
test('render icon default slot', () => {
const wrapper = mount({
render(h) {
return h(Icon, { props: { name: 'success' } }, ['Default slot']);
}
});
expect(wrapper).toMatchSnapshot();
});
test('tag prop', () => {
const wrapper = mount(Icon, {
propsData: {
tag: 'div'
}
});
expect(wrapper).toMatchSnapshot();
});
test('size without unit', () => {
const wrapper = mount(Icon, {
propsData: {
size: 20
}
});
expect(wrapper).toMatchSnapshot();
});