chore: add trailingComma
This commit is contained in:
@@ -10,7 +10,7 @@ function mockOffsetHeight(offsetHeight) {
|
||||
Object.defineProperty(HTMLElement.prototype, 'offsetHeight', {
|
||||
get() {
|
||||
return offsetHeight;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ test('custom anchor text', () => {
|
||||
<van-index-anchor index="A">Title A</van-index-anchor>
|
||||
<van-index-anchor index="B">Title B</van-index-anchor>
|
||||
</van-index-bar>
|
||||
`
|
||||
`,
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
@@ -37,8 +37,8 @@ test('click and scroll to anchor', () => {
|
||||
</van-index-bar>
|
||||
`,
|
||||
methods: {
|
||||
onSelect
|
||||
}
|
||||
onSelect,
|
||||
},
|
||||
});
|
||||
|
||||
const fn = mockScrollIntoView();
|
||||
@@ -60,8 +60,8 @@ test('touch and scroll to anchor', () => {
|
||||
</van-index-bar>
|
||||
`,
|
||||
methods: {
|
||||
onSelect
|
||||
}
|
||||
onSelect,
|
||||
},
|
||||
});
|
||||
|
||||
const fn = mockScrollIntoView();
|
||||
@@ -77,7 +77,7 @@ test('touch and scroll to anchor', () => {
|
||||
|
||||
if (index === 3) {
|
||||
return {
|
||||
dataset: {}
|
||||
dataset: {},
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -102,7 +102,7 @@ test('scroll and update active anchor', () => {
|
||||
Element.prototype.getBoundingClientRect = function () {
|
||||
const { index } = this.dataset;
|
||||
return {
|
||||
top: index ? index * 10 : 0
|
||||
top: index ? index * 10 : 0,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -121,9 +121,9 @@ test('scroll and update active anchor', () => {
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
sticky: false
|
||||
sticky: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
window.scrollTop = 0;
|
||||
|
||||
Reference in New Issue
Block a user