From 09a6f3cecf52edfcb98c31af8e0a1891d7376377 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 6 Sep 2023 11:52:09 +0800 Subject: [PATCH] test: update jest snapshot and fix type (#44652) * test: update jest snapshot * type: fix setTimeout ReturnType --- components/_util/ActionButton.tsx | 2 +- .../__snapshots__/demo-extend.test.ts.snap | 5 +-- .../__tests__/__snapshots__/demo.test.ts.snap | 5 +-- .../__snapshots__/demo-extend.test.tsx.snap | 5 +-- .../__tests__/__snapshots__/demo.test.ts.snap | 5 +-- .../__snapshots__/demo-extend.test.ts.snap | 31 +++++-------------- .../__tests__/__snapshots__/demo.test.ts.snap | 31 +++++-------------- .../input/hooks/useRemovePasswordTimeout.ts | 4 +-- .../__snapshots__/demo-extend.test.ts.snap | 10 ++---- .../__tests__/__snapshots__/demo.test.ts.snap | 10 ++---- .../__snapshots__/demo-extend.test.ts.snap | 5 +-- components/statistic/Countdown.tsx | 4 +-- .../__snapshots__/demo-extend.test.ts.snap | 10 ++---- .../__tests__/__snapshots__/demo.test.ts.snap | 10 ++---- .../__snapshots__/demo-extend.test.ts.snap | 10 ++---- .../__tests__/__snapshots__/demo.test.ts.snap | 10 ++---- components/upload/UploadList/ListItem.tsx | 12 +++---- .../__snapshots__/demo-extend.test.ts.snap | 15 ++------- .../__tests__/__snapshots__/demo.test.ts.snap | 15 ++------- 19 files changed, 48 insertions(+), 151 deletions(-) diff --git a/components/_util/ActionButton.tsx b/components/_util/ActionButton.tsx index 499fcd40ed42..a3c4105195b5 100644 --- a/components/_util/ActionButton.tsx +++ b/components/_util/ActionButton.tsx @@ -30,7 +30,7 @@ const ActionButton: React.FC = (props) => { }; React.useEffect(() => { - let timeoutId: NodeJS.Timer | null = null; + let timeoutId: ReturnType | null = null; if (props.autoFocus) { timeoutId = setTimeout(() => { ref.current?.focus(); diff --git a/components/badge/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/badge/__tests__/__snapshots__/demo-extend.test.ts.snap index 37ecfb793bc7..c259d778da02 100644 --- a/components/badge/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/badge/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -162,14 +162,11 @@ Array [ viewBox="64 64 896 896" width="1em" > - -