chore: add trailingComma

This commit is contained in:
陈嘉涵
2020-01-19 11:57:09 +08:00
parent e841175fe8
commit 389d68884d
269 changed files with 2706 additions and 2702 deletions
+21 -21
View File
@@ -6,16 +6,16 @@ test('click event', () => {
const wrapper = mount(Card, {
context: {
on: {
click: onClick
}
}
click: onClick,
},
},
});
wrapper.trigger('click');
expect(onClick).toHaveBeenCalledWith(
expect.objectContaining({
isTrusted: expect.any(Boolean)
isTrusted: expect.any(Boolean),
})
);
});
@@ -24,20 +24,20 @@ test('click-thumb event', () => {
const onClickThumb = jest.fn();
const wrapper = mount(Card, {
propsData: {
thumb: 'xx'
thumb: 'xx',
},
context: {
on: {
'click-thumb': onClickThumb
}
}
'click-thumb': onClickThumb,
},
},
});
wrapper.find('.van-card__thumb').trigger('click');
expect(onClickThumb).toHaveBeenCalledWith(
expect.objectContaining({
isTrusted: expect.any(Boolean)
isTrusted: expect.any(Boolean),
})
);
});
@@ -46,8 +46,8 @@ test('render price & num slot', () => {
const wrapper = mount(Card, {
scopedSlots: {
num: () => 'Custom Num',
price: () => 'Custom Price'
}
price: () => 'Custom Price',
},
});
expect(wrapper).toMatchSnapshot();
@@ -56,8 +56,8 @@ test('render price & num slot', () => {
test('render origin-price slot', () => {
const wrapper = mount(Card, {
scopedSlots: {
'origin-price': () => 'Custom Origin Price'
}
'origin-price': () => 'Custom Origin Price',
},
});
expect(wrapper).toMatchSnapshot();
@@ -66,8 +66,8 @@ test('render origin-price slot', () => {
test('render bottom slot', () => {
const wrapper = mount(Card, {
scopedSlots: {
bottom: () => 'Custom Bottom'
}
bottom: () => 'Custom Bottom',
},
});
expect(wrapper).toMatchSnapshot();
@@ -77,8 +77,8 @@ test('render thumb & tag slot', () => {
const wrapper = mount(Card, {
scopedSlots: {
tag: () => 'Custom Tag',
thumb: () => 'Custom Thumb'
}
thumb: () => 'Custom Thumb',
},
});
expect(wrapper).toMatchSnapshot();
@@ -88,8 +88,8 @@ test('render title & desc slot', () => {
const wrapper = mount(Card, {
scopedSlots: {
title: () => 'Custom Title',
desc: () => 'Custom desc'
}
desc: () => 'Custom desc',
},
});
expect(wrapper).toMatchSnapshot();
@@ -99,8 +99,8 @@ test('render price & price-top slot', () => {
const wrapper = mount(Card, {
scopedSlots: {
price: () => 'Custom Price',
'price-top': () => 'Custom Price-top'
}
'price-top': () => 'Custom Price-top',
},
});
expect(wrapper).toMatchSnapshot();