Skip to content

Commit

Permalink
fix(test): remove the useless test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatpandac committed Dec 27, 2023
1 parent 32933e5 commit aac3ae0
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions tests/refs.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@ import Table, { type Reference } from '../src';

describe('Table.Ref', () => {
let scrollParam: any = null;
let scrollIntoViewElement: HTMLElement = null;

beforeAll(() => {
spyElementPrototypes(HTMLElement, {
scrollTo: (_: any, param: any) => {
scrollParam = param;
},
scrollIntoView() {
// eslint-disable-next-line @typescript-eslint/no-this-alias
scrollIntoViewElement = this;
},
});
});

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

expect(scrollParam.top).toEqual(903);

// Scroll index
ref.current.scrollTo({
index: 0,
});
expect(scrollIntoViewElement.textContent).toEqual('light');

// Scroll key
ref.current.scrollTo({
key: 'bamboo',
});
expect(scrollIntoViewElement.textContent).toEqual('bamboo');
});
});

0 comments on commit aac3ae0

Please sign in to comment.