From 18d41e00e01f44149984422da12f18acb03a865e Mon Sep 17 00:00:00 2001 From: jingzouzou <827088092@qq.com> Date: Sat, 26 Oct 2024 22:12:47 +0800 Subject: [PATCH] chore: optimize range-align.spec.tsx --- tests/{range-aligin.spec.tsx => range-align.spec.tsx} | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) rename tests/{range-aligin.spec.tsx => range-align.spec.tsx} (99%) diff --git a/tests/range-aligin.spec.tsx b/tests/range-align.spec.tsx similarity index 99% rename from tests/range-aligin.spec.tsx rename to tests/range-align.spec.tsx index 915f8e6a9..b5699a1d2 100644 --- a/tests/range-aligin.spec.tsx +++ b/tests/range-align.spec.tsx @@ -15,6 +15,7 @@ describe('the popup arrow should be placed in the correct position.', () => { }; document.documentElement.scrollLeft = 0; + jest.useFakeTimers(); }); beforeAll(() => { @@ -76,10 +77,6 @@ describe('the popup arrow should be placed in the correct position.', () => { }); }); - beforeEach(() => { - jest.useFakeTimers(); - }); - afterEach(() => { cleanup(); jest.useRealTimers();