Skip to content

Conversation

@dasosann
Copy link
Contributor

@dasosann dasosann commented Nov 28, 2025

요약

feat: 테스트 코드 추가

구현 사항

  • HEIC → JPEG 변환 로직 테스트
  • 업로드 검증 로직 테스트 (용량, 개수 제한)
  • 이미지 확인 유틸리티 테스트
  • 파일 업로드 전체 흐름 오케스트레이션 테스트
  • 온보딩 API 호출 훅 테스트

📸 스크린샷

Need Review

  • ~ 부분 이렇게 구현했어요, 피드백 부탁해요!

Reference

📜 리뷰 규칙

Reviewer는 아래 P5 Rule을 참고하여 리뷰를 진행합니다.
P5 Rule을 통해 Reviewer는 Reviewee에게 리뷰의 의도를 보다 정확히 전달할 수 있습니다.

  • P1: 꼭 반영해주세요 (Comment)
  • P2: 적극적으로 고려해주세요 (Comment)
  • P3: 웬만하면 반영해 주세요 (Comment)
  • P4: 반영해도 좋고 넘어가도 좋습니다 (Approve)
  • P5: 그냥 사소한 의견입니다 (Approve)

@vercel
Copy link

vercel bot commented Nov 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
fe Ready Ready Preview Comment Nov 28, 2025 6:06pm

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dasosann, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 기존 기능에 대한 테스트 커버리지를 향상시키기 위해 여러 테스트 파일을 도입합니다. 주로 이미지 업로드 및 처리 로직과 사용자 온보딩 프로세스와 관련된 유틸리티 함수 및 커스텀 훅의 견고성을 보장하는 데 중점을 둡니다. 또한, Vitest 테스트 프레임워크를 위한 초기 설정도 포함되어 있습니다.

Highlights

  • 새로운 테스트 파일 추가: 이미지 처리, 파일 업로드 및 사용자 온보딩 관련 유틸리티 함수와 커스텀 훅에 대한 여러 새로운 테스트 파일이 추가되었습니다.
  • Vitest 설정: 테스트 환경 및 경로 별칭을 설정하는 vitest.config.ts 파일이 새로 추가되었습니다.
  • 이미지 유틸리티 테스트: checkImages, handleFileUpload, heicToJpeg, validateUpload와 같은 이미지 관련 유틸리티 함수에 대한 포괄적인 테스트가 포함되었습니다.
  • 온보딩 훅 테스트: useOnBoardingMutation 커스텀 훅에 대한 테스트가 추가되어 useMutation 및 API 호출의 올바른 동작을 확인합니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

PR은 Vitest를 사용하여 여러 유틸리티 함수와 커스텀 훅에 대한 테스트 코드를 추가합니다. 전반적으로 테스트 케이스들은 주요 로직들을 잘 커버하고 있습니다. 다만, 몇 가지 개선점을 제안합니다.

  • 타입 안전성: 여러 테스트 파일에서 as any를 사용하여 타입 캐스팅을 하고 있는데, 이는 타입스크립트의 이점을 살리지 못하고 잠재적인 오류를 유발할 수 있습니다. Vitest에서 제공하는 vi.mocked 유틸리티를 사용하여 타입 안전성을 확보하는 것이 좋습니다.
  • 테스트 환경 설정: vitest.config.ts에서 기본 테스트 환경이 node로 설정되어 있습니다. 하지만 Toast 컴포넌트를 사용하는 테스트 등 DOM API가 필요한 테스트가 있어 jsdom 환경이 필요합니다. 기본 환경을 jsdom으로 변경하여 테스트가 정상적으로 실행되도록 하는 것을 권장합니다.

이러한 점들을 수정하면 더 안정적이고 유지보수하기 좋은 테스트 코드가 될 것입니다.

@dasosann dasosann merged commit ea88c37 into main Nov 28, 2025
4 checks passed
@dasosann dasosann deleted the test/tae branch November 28, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants