test: should not emit deprecation warning in test (#7356)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`should not render when info is empty string 1`] = ``;
|
||||
exports[`should not render when badge is empty string 1`] = ``;
|
||||
|
||||
exports[`should not render when info is empty undefined 1`] = ``;
|
||||
exports[`should not render when badge is empty undefined 1`] = ``;
|
||||
|
||||
exports[`should render when info is zero 1`] = `<div class="van-info">0</div>`;
|
||||
exports[`should render when badge is zero 1`] = ``;
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
import Info from '..';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('should not render when info is empty string', () => {
|
||||
test('should not render when badge is empty string', () => {
|
||||
const wrapper = mount(Info, {
|
||||
propsData: {
|
||||
info: '',
|
||||
badge: '',
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('should not render when info is empty undefined', () => {
|
||||
test('should not render when badge is empty undefined', () => {
|
||||
const wrapper = mount(Info, {
|
||||
propsData: {
|
||||
info: undefined,
|
||||
badge: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('should render when info is zero', () => {
|
||||
test('should render when badge is zero', () => {
|
||||
const wrapper = mount(Info, {
|
||||
propsData: {
|
||||
info: 0,
|
||||
badge: 0,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user