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
-22
View File
@@ -123,28 +123,6 @@ test('lazy render collapse content', async () => {
expect(wrapper).toMatchSnapshot();
});
test('warn when value type is incorrect', () => {
const originConsoleError = console.error;
const error = jest.fn();
console.error = error;
mount({
template: `
<van-collapse v-model="active">
<van-collapse-item title="a" name="first"></van-collapse-item>
</van-collapse>
`,
data() {
return {
active: 0,
};
},
});
expect(error).toHaveBeenCalledTimes(1);
console.error = originConsoleError;
});
test('toggle method', (done) => {
mount({
template: `