Skip to content

[Test] 주요 유틸 / 훅 단위 테스트 작성 #134

Open

Description

@ming0o

배경

Vitest 환경 구축(별도 이슈) 후 핵심 로직부터 테스트 커버. 100% 커버를 목표하지 않고 "실수하면 큰 사고" 지점 우선.

우선순위 대상

  • src/lib/env.ts (v1.1에서 추가될 경우)
  • src/lib/date.ts (v1.1에서 추가될 경우) 포매터
  • src/api/client.ts 인터셉터 (401 refresh 재시도)
  • 커스텀 훅 (hooks/archive/useResourceList 등 복잡한 것들)
  • 권한 체크 헬퍼 (v2.0에서 추가될 경우)

완료 기준

  • 핵심 유틸/훅 20개 이상 단위 테스트 확보
  • CI에서 자동 실행
  • 테스트 커버리지 70% 이상 (대상 파일 한정)

참고

  • react-query 훅 테스트는 renderHook + QueryClientProvider 래퍼 패턴

Activity

  1. added this to the v2.1 Polish milestone on Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    test테스트

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions