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
@@ -5,7 +5,7 @@ function mockGetBoundingClientRect(items) {
items.filter((icon, index) => {
icon.element.getBoundingClientRect = () => ({
left: index * 25,
width: 25
width: 25,
});
return true;
});
@@ -21,8 +21,8 @@ test('change event', () => {
onInput(value);
wrapper.setProps({ value });
},
change: onChange
}
change: onChange,
},
});
const item4 = wrapper.findAll('.van-rate__icon').at(3);
@@ -41,12 +41,12 @@ test('allow half', () => {
const wrapper = mount(Rate, {
propsData: {
allowHalf: true
allowHalf: true,
},
listeners: {
input: onInput,
change: onChange
}
change: onChange,
},
});
const item4 = wrapper.findAll('.van-rate__icon--half').at(3);
@@ -61,12 +61,12 @@ test('disabled', () => {
const wrapper = mount(Rate, {
propsData: {
disabled: true
disabled: true,
},
listeners: {
input: onInput,
change: onChange
}
change: onChange,
},
});
const item4 = wrapper.findAll('.van-rate__item').at(3);
@@ -81,8 +81,8 @@ test('touchmove to select item', () => {
const onChange = jest.fn();
const wrapper = mount(Rate, {
listeners: {
change: onChange
}
change: onChange,
},
});
const icons = wrapper.findAll('.van-rate__item');
@@ -100,11 +100,11 @@ test('touchmove to select half item', () => {
const onChange = jest.fn();
const wrapper = mount(Rate, {
propsData: {
allowHalf: true
allowHalf: true,
},
listeners: {
change: onChange
}
change: onChange,
},
});
const icons = wrapper.findAll('.van-rate__item');
@@ -121,8 +121,8 @@ test('touchmove to select half item', () => {
test('gutter prop', () => {
const wrapper = mount(Rate, {
propsData: {
gutter: 10
}
gutter: 10,
},
});
expect(wrapper).toMatchSnapshot();
@@ -131,8 +131,8 @@ test('gutter prop', () => {
test('size prop', () => {
const wrapper = mount(Rate, {
propsData: {
size: '2rem'
}
size: '2rem',
},
});
expect(wrapper).toMatchSnapshot();
@@ -142,11 +142,11 @@ test('untouchable', () => {
const onChange = jest.fn();
const wrapper = mount(Rate, {
propsData: {
touchable: false
touchable: false,
},
listeners: {
change: onChange
}
change: onChange,
},
});
triggerDrag(wrapper, 100, 0);