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

View File

@@ -4,8 +4,8 @@ import { mount, later } from '../../../test';
test('disabled stepper', () => {
const wrapper = mount(Stepper, {
propsData: {
disabled: true
}
disabled: true,
},
});
expect(wrapper).toMatchSnapshot();
});
@@ -13,8 +13,8 @@ test('disabled stepper', () => {
test('disable stepper input', () => {
const wrapper = mount(Stepper, {
propsData: {
disableInput: true
}
disableInput: true,
},
});
expect(wrapper).toMatchSnapshot();
});
@@ -22,8 +22,8 @@ test('disable stepper input', () => {
test('disable button', async () => {
const wrapper = mount(Stepper, {
propsData: {
value: 5
}
value: 5,
},
});
const plus = wrapper.find('.van-stepper__plus');
@@ -37,7 +37,7 @@ test('disable button', async () => {
wrapper.setProps({
disablePlus: true,
disableMinus: true
disableMinus: true,
});
await later();
@@ -52,8 +52,8 @@ test('click button', () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1,
max: 2
}
max: 2,
},
});
const plus = wrapper.find('.van-stepper__plus');
@@ -71,8 +71,8 @@ test('click button', () => {
test('long press', async () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1
}
value: 1,
},
});
const plus = wrapper.find('.van-stepper__plus');
@@ -93,8 +93,8 @@ test('disable long press', async () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1,
longPress: false
}
longPress: false,
},
});
const plus = wrapper.find('.van-stepper__plus');
@@ -108,8 +108,8 @@ test('disable long press', async () => {
test('filter value during user input', () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1
}
value: 1,
},
});
const input = wrapper.find('.van-stepper__input');
@@ -132,8 +132,8 @@ test('shoud watch value and format it', () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1,
max: 5
}
max: 5,
},
});
wrapper.setData({ value: 10 });
@@ -144,8 +144,8 @@ test('only allow interger', () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1,
integer: true
}
integer: true,
},
});
const input = wrapper.find('input');
@@ -168,8 +168,8 @@ test('stepper blur', () => {
const wrapper = mount(Stepper, {
propsData: {
value: 5,
min: 3
}
min: 3,
},
});
wrapper.vm.$on('input', value => {
@@ -188,8 +188,8 @@ test('stepper blur', () => {
test('input-width prop', () => {
const wrapper = mount(Stepper, {
propsData: {
inputWidth: '10rem'
}
inputWidth: '10rem',
},
});
expect(wrapper).toMatchSnapshot();
});
@@ -197,8 +197,8 @@ test('input-width prop', () => {
test('button-size prop', () => {
const wrapper = mount(Stepper, {
propsData: {
buttonSize: '2rem'
}
buttonSize: '2rem',
},
});
expect(wrapper).toMatchSnapshot();
});
@@ -207,8 +207,8 @@ test('async-change prop', () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1,
asyncChange: true
}
asyncChange: true,
},
});
const plus = wrapper.find('.van-stepper__plus');
@@ -229,8 +229,8 @@ test('min value is 0', () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1,
min: 0
}
min: 0,
},
});
const input = wrapper.find('input');
@@ -245,8 +245,8 @@ test('show-plus & show-minus props', () => {
const wrapper = mount(Stepper, {
propsData: {
showPlus: false,
showMinus: false
}
showMinus: false,
},
});
expect(wrapper).toMatchSnapshot();
@@ -257,8 +257,8 @@ test('decimal-length prop', () => {
propsData: {
value: 1,
step: 0.2,
decimalLength: 2
}
decimalLength: 2,
},
});
expect(wrapper.emitted('input')[0][0]).toEqual('1.00');
@@ -273,8 +273,8 @@ test('should limit decimal-length when input', () => {
propsData: {
value: 1,
step: 0.2,
decimalLength: 1
}
decimalLength: 1,
},
});
const input = wrapper.find('input');
@@ -300,8 +300,8 @@ test('name prop', () => {
test('change min and max', async () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1
}
value: 1,
},
});
wrapper.setProps({
@@ -326,12 +326,12 @@ test('change min and max', async () => {
test('change decimal-length', async () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1.33
}
value: 1.33,
},
});
wrapper.setProps({
decimalLength: 1
decimalLength: 1,
});
await later();
@@ -342,12 +342,12 @@ test('change decimal-length', async () => {
test('change integer', async () => {
const wrapper = mount(Stepper, {
propsData: {
value: 1.33
}
value: 1.33,
},
});
wrapper.setProps({
integer: true
integer: true,
});
await later();