From 83076fc8b63c3da3abf594465184cf2f474ada8a Mon Sep 17 00:00:00 2001 From: Collection50 Date: Sun, 1 Dec 2024 15:19:03 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=EC=9D=98=20=EC=98=81=EB=AC=B8=EC=9D=84=20=ED=95=9C?= =?UTF-8?q?=EA=B8=80=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../useDependencyTimeout/useDependencyTimeout.spec.tsx | 10 +++++----- .../react/src/hooks/useTimeout/useTimeout.spec.tsx | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/react/src/hooks/useDependencyTimeout/useDependencyTimeout.spec.tsx b/packages/react/src/hooks/useDependencyTimeout/useDependencyTimeout.spec.tsx index 9b1e0392e..74046f2fd 100644 --- a/packages/react/src/hooks/useDependencyTimeout/useDependencyTimeout.spec.tsx +++ b/packages/react/src/hooks/useDependencyTimeout/useDependencyTimeout.spec.tsx @@ -13,7 +13,7 @@ afterEach(() => { }); describe('useDependencyTimeout', () => { - it('should call callback on mount if callOnMount is true', () => { + it('callOnMount가 true면 마운트 시 콜백을 호출해야 합니다.', () => { const mockFn = vi.fn(); renderHook(() => @@ -27,7 +27,7 @@ describe('useDependencyTimeout', () => { expect(mockFn).toBeCalledTimes(2); }); - it('should not call callback on mount if callOnMount is false', () => { + it('callOnMount가 false면 마운트 시 콜백을 호출하지 않아야 합니다.', () => { const mockFn = vi.fn(); renderHook(() => @@ -41,7 +41,7 @@ describe('useDependencyTimeout', () => { expect(mockFn).toBeCalledTimes(1); }); - it('should reset the timeout when dependencies change', () => { + it('의존성이 변경될 때 타임아웃을 리셋해야 합니다.', () => { const mockFn = vi.fn(); const { rerender } = renderHook( @@ -65,7 +65,7 @@ describe('useDependencyTimeout', () => { expect(mockFn).toBeCalledTimes(1); }); - it('should allow clearing the timeout', () => { + it('타임아웃을 해제할 수 있어야 합니다.', () => { const mockFn = vi.fn(); const { result } = renderHook(() => @@ -83,7 +83,7 @@ describe('useDependencyTimeout', () => { expect(mockFn).not.toBeCalled(); }); - it('should allow manual reset of the timeout', () => { + it('타임아웃을 수동으로 리셋할 수 있어야 합니다.', () => { const mockFn = vi.fn(); renderHook(() => diff --git a/packages/react/src/hooks/useTimeout/useTimeout.spec.tsx b/packages/react/src/hooks/useTimeout/useTimeout.spec.tsx index 19219a564..830eef79a 100644 --- a/packages/react/src/hooks/useTimeout/useTimeout.spec.tsx +++ b/packages/react/src/hooks/useTimeout/useTimeout.spec.tsx @@ -29,7 +29,7 @@ const TestComponent = () => { }; describe('useTimeout', () => { - it('should call the function after the specified delay', () => { + it('지정된 delay 후에 함수가 호출되어야 합니다.', () => { const mockFn = vi.fn(); renderHook(() => useTimeout(mockFn, { delay: delayTime })); @@ -40,7 +40,7 @@ describe('useTimeout', () => { expect(mockFn).toBeCalled(); }); - it('should call the function only when enabled', () => { + it('활성화된 경우에만 함수가 호출되어야 합니다.', () => { const mockFn = vi.fn(); const { rerender } = renderHook( @@ -62,7 +62,7 @@ describe('useTimeout', () => { expect(mockFn).toBeCalled(); }); - it('should call the function after being set and reset', () => { + it('설정 및 재설정된 후 함수가 호출되어야 합니다.', () => { const mockFn = vi.fn(); const { result } = renderHook( @@ -90,7 +90,7 @@ describe('useTimeout', () => { expect(mockFn).toBeCalledTimes(2); }); - it('should disable the timeout when delay is undefined', () => { + it('delay가 undefined일 경우 타이머가 비활성화되어야 합니다.', () => { const mockFn = vi.fn(); renderHook(() => @@ -103,7 +103,7 @@ describe('useTimeout', () => { expect(mockFn).toBeCalled(); }); - it('should ensure the callback function always has the latest state', () => { + it('콜백 함수가 항상 최신 상태를 유지해야 합니다.', () => { renderSetup(); expect(screen.getByText('0')).toBeInTheDocument();