test: fix wrapper snapshot usage

This commit is contained in:
chenjiahan
2020-11-08 20:03:39 +08:00
parent 95f02cd6e2
commit fffb9b3d5d
60 changed files with 318 additions and 318 deletions
+7 -7
View File
@@ -82,7 +82,7 @@ test('render disabled coupon', () => {
},
});
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('render coupon list', async () => {
@@ -101,7 +101,7 @@ test('render coupon list', async () => {
},
});
await later();
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('render empty coupon list', () => {
@@ -112,7 +112,7 @@ test('render empty coupon list', () => {
},
});
wrapper.findAll('.van-tab').at(1).trigger('click');
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('empty-image prop', () => {
@@ -122,7 +122,7 @@ test('empty-image prop', () => {
},
});
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('exchange coupon', () => {
@@ -154,7 +154,7 @@ test('render coupon cell', () => {
},
});
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
wrapper.trigger('click');
expect(onClick).toHaveBeenCalledTimes(1);
});
@@ -166,7 +166,7 @@ test('render coupon cell with coupon', () => {
chosenCoupon: 0,
},
});
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('render coupon cell with zero discount', () => {
@@ -176,5 +176,5 @@ test('render coupon cell with zero discount', () => {
chosenCoupon: 0,
},
});
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});