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
@@ -256,7 +256,7 @@ test('row-height prop', async () => {
await later();
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('formatter prop', async () => {
@@ -291,7 +291,7 @@ test('formatter prop', async () => {
await later();
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('title & footer slot', async () => {
@@ -310,7 +310,7 @@ test('title & footer slot', async () => {
await later();
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('should reset when type changed', async () => {
@@ -398,12 +398,12 @@ test('popup wrapper', async () => {
});
await later();
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
wrapper.setProps({ value: true });
await later();
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
wrapper.find('.van-popup__close-icon').trigger('click');
expect(wrapper.element.style.display).toEqual('none');
@@ -437,7 +437,7 @@ test('color prop when type is single', async () => {
await later();
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('color prop when type is range', async () => {
@@ -454,7 +454,7 @@ test('color prop when type is range', async () => {
await later();
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('close event', () => {
+1 -1
View File
@@ -178,7 +178,7 @@ test('lazy-render prop', () => {
},
});
expect(wrapper).toMatchSnapshot();
expect(wrapper.html()).toMatchSnapshot();
});
test('month-show event', async () => {