breaking change: rename Info to Badge
This commit is contained in:
@@ -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>`;
|
||||
@@ -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();
|
||||
});
|
||||
Reference in New Issue
Block a user