Skip to content

test: auth 관련 유닛 테스트 추가#174

Merged
g-hyxn merged 9 commits intodevelopfrom
test/auth
Apr 9, 2026
Merged

test: auth 관련 유닛 테스트 추가#174
g-hyxn merged 9 commits intodevelopfrom
test/auth

Conversation

@g-hyxn
Copy link
Copy Markdown
Contributor

@g-hyxn g-hyxn commented Apr 9, 2026

💡 PR 요약

auth 관련 핵심 로직에 대한 유닛 테스트를 추가합니다.

📋 테스트 목록

파일 테스트 내용
src/entities/user/model/__tests__/schema.test.ts 전화번호 / 비밀번호 / 인증코드 유효성
src/shared/utils/__tests__/auth.test.ts 토큰 저장·삭제·조회, 로그인 상태 확인
src/__tests__/middleware.test.ts 라우팅 보호, 오픈 리다이렉트 방지, 어드민 접근, 슬로건 게이트
src/widgets/signin/lib/__tests__/handleSigninFormSubmit.test.ts 로그인 리다이렉트, 오픈 리다이렉트 방지
src/widgets/signup/lib/__tests__/handleSignupFormSubmit.test.ts 비밀번호 확인, 회원가입 성공/실패

✅ 테스트 결과

  • 61개 테스트 전부 통과

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

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

Project Deployment Actions Updated (UTC)
gwangju-talent-festival-client Ready Ready Preview, Comment Apr 9, 2026 2:35pm

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 94.44% 102 / 108
🔵 Statements 93.75% 105 / 112
🔵 Functions 100% 16 / 16
🔵 Branches 83% 83 / 100
File CoverageNo changed files found.
Generated in workflow #385 for commit f812496 by the Vitest Coverage Report Action

@g-hyxn g-hyxn self-assigned this Apr 9, 2026
@g-hyxn g-hyxn requested review from bae080311, koreahghg and zaewc April 9, 2026 08:53
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

✅ CI 성공 (빌드 & 린트 통과)

Copy link
Copy Markdown

@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

This pull request introduces a comprehensive suite of unit and integration tests covering middleware routing, authentication utilities, Zod schemas, and form submission handlers for sign-in and sign-up processes. The feedback provided focuses on enhancing test maintainability and coverage. Key suggestions include refactoring timer cleanup using afterEach in middleware tests, improving assertion specificity for schema validation errors, creating helper functions to reduce duplication when mocking global objects like window.location, and ensuring that side effects like toast notifications are verified during validation failures.

Comment thread src/__tests__/middleware.test.ts
Comment thread src/entities/user/model/__tests__/schema.test.ts
Comment thread src/widgets/signin/lib/__tests__/handleSigninFormSubmit.test.ts
Comment thread src/widgets/signup/lib/__tests__/handleSignupFormSubmit.test.ts
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

✅ CI 성공 (빌드 & 린트 통과)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

✅ CI 성공 (빌드 & 린트 통과)

@g-hyxn
Copy link
Copy Markdown
Contributor Author

g-hyxn commented Apr 9, 2026

/gemini review

Copy link
Copy Markdown

@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

This pull request adds a new testing guide and comprehensive unit tests for middleware, user schemas, authentication utilities, and form handlers. The reviewer identified missing test coverage for specific middleware routing rules and suggested improvements for test isolation and assertion completeness in the sign-in form tests.

Comment thread src/__tests__/middleware.test.ts
Comment thread src/widgets/signin/lib/__tests__/handleSigninFormSubmit.test.ts
Comment thread src/widgets/signin/lib/__tests__/handleSigninFormSubmit.test.ts
g-hyxn and others added 2 commits April 9, 2026 23:30
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

✅ CI 성공 (빌드 & 린트 통과)

@g-hyxn g-hyxn merged commit d63eb8d into develop Apr 9, 2026
5 checks passed
@g-hyxn g-hyxn deleted the test/auth branch April 11, 2026 06:01
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.

3 participants