From 91a33364dcf91f27ca486a52a9d44783e7e7aaea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=90=E1=85=A2=E1=84=92=E1=85=AE?= =?UTF-8?q?=E1=86=AB?= Date: Thu, 22 Aug 2024 04:43:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20lottie-react=EB=A5=BC=20mocking=ED=95=98?= =?UTF-8?q?=EC=97=AC=20lottie=EA=B0=80=20=EB=A0=8C=EB=8D=94=EB=A7=81=20?= =?UTF-8?q?=EC=8B=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8=EA=B0=80=20=EC=8B=A4?= =?UTF-8?q?=ED=8C=A8=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/hooks/useError/useError.test.tsx | 2 ++ client/src/hooks/useToast/useToast.test.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/client/src/hooks/useError/useError.test.tsx b/client/src/hooks/useError/useError.test.tsx index 7c39d0e95..230c5889b 100644 --- a/client/src/hooks/useError/useError.test.tsx +++ b/client/src/hooks/useError/useError.test.tsx @@ -10,6 +10,8 @@ import UnhandledErrorBoundary from '../../UnhandledErrorBoundary'; import {ErrorInfo, ErrorProvider} from './ErrorProvider'; import {useError} from './useError'; +jest.mock('lottie-react', () => () =>
Lottie Mock
); + describe('useError', () => { const initializeProvider = () => renderHook(() => useError(), { diff --git a/client/src/hooks/useToast/useToast.test.tsx b/client/src/hooks/useToast/useToast.test.tsx index 6f9522a24..54906cea4 100644 --- a/client/src/hooks/useToast/useToast.test.tsx +++ b/client/src/hooks/useToast/useToast.test.tsx @@ -11,6 +11,8 @@ import {ErrorInfo, ErrorProvider} from '../../hooks/useError/ErrorProvider'; // import {ToastProvider} from './ToastProvider'; // 위 코드에 해당하는 ToastProvider 경로 +jest.mock('lottie-react', () => () =>
Lottie Mock
); + // 테스트용 헬퍼 컴포넌트 const TestComponent = ({errorInfo}: {errorInfo: ErrorInfo}) => { const {setErrorInfo} = useError();