Skip to content

Commit aac3ae0

Browse files
committed
fix(test): remove the useless test case
1 parent 32933e5 commit aac3ae0

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

tests/refs.spec.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ import Table, { type Reference } from '../src';
55

66
describe('Table.Ref', () => {
77
let scrollParam: any = null;
8-
let scrollIntoViewElement: HTMLElement = null;
98

109
beforeAll(() => {
1110
spyElementPrototypes(HTMLElement, {
1211
scrollTo: (_: any, param: any) => {
1312
scrollParam = param;
1413
},
15-
scrollIntoView() {
16-
// eslint-disable-next-line @typescript-eslint/no-this-alias
17-
scrollIntoViewElement = this;
18-
},
1914
});
2015
});
2116

@@ -49,17 +44,5 @@ describe('Table.Ref', () => {
4944
});
5045

5146
expect(scrollParam.top).toEqual(903);
52-
53-
// Scroll index
54-
ref.current.scrollTo({
55-
index: 0,
56-
});
57-
expect(scrollIntoViewElement.textContent).toEqual('light');
58-
59-
// Scroll key
60-
ref.current.scrollTo({
61-
key: 'bamboo',
62-
});
63-
expect(scrollIntoViewElement.textContent).toEqual('bamboo');
6447
});
6548
});

0 commit comments

Comments
 (0)