From 7b719ce457ce6c140962b29f0db0af54cbb3a9c8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 11 Aug 2018 15:16:33 +0800 Subject: [PATCH] simplicy Anchor test --- components/anchor/__tests__/Anchor.test.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/anchor/__tests__/Anchor.test.js b/components/anchor/__tests__/Anchor.test.js index ea67e51572..13fd5ab387 100644 --- a/components/anchor/__tests__/Anchor.test.js +++ b/components/anchor/__tests__/Anchor.test.js @@ -62,10 +62,7 @@ describe('Anchor Render', () => { wrapper.instance().handleScrollTo('##API'); expect(wrapper.instance().state.activeLink).toBe('##API'); expect(scrollToSpy).not.toHaveBeenCalled(); - await new Promise(resolve => setTimeout(resolve, 100)); - expect(wrapper.instance().animating).toBe(true); await new Promise(resolve => setTimeout(resolve, 1000)); - expect(wrapper.instance().animating).toBe(false); expect(scrollToSpy).toHaveBeenCalled(); });