test: should not emit deprecation warning in test (#7356)

This commit is contained in:
neverland
2020-10-18 19:54:39 +08:00
committed by GitHub
parent 1b97315b54
commit 22888a7e97
20 changed files with 50 additions and 78 deletions
@@ -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`] = ``;
+6 -6
View File
@@ -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,
},
});