breaking change: rename Info to Badge

This commit is contained in:
chenjiahan
2020-08-20 19:36:12 +08:00
parent 4e5f509b2f
commit 63bd4700ab
40 changed files with 157 additions and 178 deletions
@@ -0,0 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should not render when badge is empty string 1`] = ``;
exports[`should not render when badge is empty undefined 1`] = ``;
exports[`should render when badge is zero 1`] = `<div class="van-badge">0</div>`;
+32
View File
@@ -0,0 +1,32 @@
import Badge from '..';
import { mount } from '../../../test';
test('should not render when badge is empty string', () => {
const wrapper = mount(Badge, {
propsData: {
badge: '',
},
});
expect(wrapper).toMatchSnapshot();
});
test('should not render when badge is empty undefined', () => {
const wrapper = mount(Badge, {
propsData: {
badge: undefined,
},
});
expect(wrapper).toMatchSnapshot();
});
test('should render when badge is zero', () => {
const wrapper = mount(Badge, {
propsData: {
badge: 0,
},
});
expect(wrapper).toMatchSnapshot();
});