From aac3ae0492f273744690690db49d4c24f01e978c Mon Sep 17 00:00:00 2001 From: Fatpandac Date: Wed, 27 Dec 2023 21:31:23 +0800 Subject: [PATCH] fix(test): remove the useless test case --- tests/refs.spec.tsx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/tests/refs.spec.tsx b/tests/refs.spec.tsx index f291741e5..9417b17e3 100644 --- a/tests/refs.spec.tsx +++ b/tests/refs.spec.tsx @@ -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; - }, }); }); @@ -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'); }); });