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
+18 -18
View File
@@ -3,7 +3,7 @@ import {
mount,
trigger,
triggerDrag,
mockGetBoundingClientRect
mockGetBoundingClientRect,
} from '../../../test';
function mockRect(vertical) {
@@ -11,7 +11,7 @@ function mockRect(vertical) {
width: vertical ? 0 : 100,
height: vertical ? 100 : 0,
top: vertical ? 0 : 100,
left: vertical ? 100 : 0
left: vertical ? 100 : 0,
});
}
@@ -21,8 +21,8 @@ test('drag button', () => {
const wrapper = mount(Slider, {
propsData: {
value: 50,
disabled: true
}
disabled: true,
},
});
wrapper.vm.$on('input', value => {
@@ -52,8 +52,8 @@ it('click bar', () => {
const wrapper = mount(Slider, {
propsData: {
value: 50,
disabled: true
}
disabled: true,
},
});
wrapper.vm.$on('input', value => {
@@ -76,8 +76,8 @@ test('drag button vertical', () => {
const wrapper = mount(Slider, {
propsData: {
value: 50,
vertical: true
}
vertical: true,
},
});
wrapper.vm.$on('input', value => {
@@ -97,8 +97,8 @@ it('click vertical', () => {
const wrapper = mount(Slider, {
propsData: {
value: 50,
vertical: true
}
vertical: true,
},
});
wrapper.vm.$on('input', value => {
@@ -115,8 +115,8 @@ it('bar height', () => {
const wrapper = mount(Slider, {
propsData: {
value: 50,
barHeight: 10
}
barHeight: 10,
},
});
expect(wrapper).toMatchSnapshot();
@@ -125,13 +125,13 @@ it('bar height', () => {
it('should not emit change event when value not changed', () => {
const wrapper = mount(Slider, {
propsData: {
value: 50
value: 50,
},
listeners: {
input(value) {
wrapper.setProps({ value });
}
}
},
},
});
trigger(wrapper, 'click', 100, 0);
@@ -143,13 +143,13 @@ it('should not emit change event when value not changed', () => {
it('should format initial value', done => {
mount(Slider, {
propsData: {
value: null
value: null,
},
listeners: {
input(value) {
expect(value).toEqual(0);
done();
}
}
},
},
});
});