Skip to content

Commit

Permalink
test: 테스트 코드의 영문을 한글로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Collection50 committed Dec 1, 2024
1 parent cbb9a78 commit 83076fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(() =>
Expand All @@ -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(() =>
Expand All @@ -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(
Expand All @@ -65,7 +65,7 @@ describe('useDependencyTimeout', () => {
expect(mockFn).toBeCalledTimes(1);
});

it('should allow clearing the timeout', () => {
it('타임아웃을 해제할 수 있어야 합니다.', () => {
const mockFn = vi.fn();

const { result } = renderHook(() =>
Expand All @@ -83,7 +83,7 @@ describe('useDependencyTimeout', () => {
expect(mockFn).not.toBeCalled();
});

it('should allow manual reset of the timeout', () => {
it('타임아웃을 수동으로 리셋할 수 있어야 합니다.', () => {
const mockFn = vi.fn();

renderHook(() =>
Expand Down
10 changes: 5 additions & 5 deletions packages/react/src/hooks/useTimeout/useTimeout.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }));
Expand All @@ -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(
Expand All @@ -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(
Expand Down Expand Up @@ -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(() =>
Expand All @@ -103,7 +103,7 @@ describe('useTimeout', () => {
expect(mockFn).toBeCalled();
});

it('should ensure the callback function always has the latest state', () => {
it('콜백 함수가 항상 최신 상태를 유지해야 합니다.', () => {
renderSetup(<TestComponent />);

expect(screen.getByText('0')).toBeInTheDocument();
Expand Down

0 comments on commit 83076fc

Please sign in to comment.