Skip to content

test: 앱 부팅이 zod 한국어 문구를 설치하는지 고정 - #65

Merged
chanwoo7 merged 1 commit into
developfrom
test/boot-zod-locale
Oct 4, 2026
Merged

chanwoo7 merged 1 commit into
developfrom
test/boot-zod-locale

Conversation

@chanwoo7

@chanwoo7 chanwoo7 commented Oct 4, 2026

Copy link
Copy Markdown
Member

배경

  • 이슈 #45입니다. main.tsx가 부팅 때 installZodKorean()을 부르지만, 이를 잡는 테스트가 없었습니다.
  • 테스트 setup과 zod-locale.spec이 직접 설치하므로, main.tsx에서 호출이 빠져도 CI가 알 수 없었습니다.

변경

  • src/main.spec.ts를 추가했습니다. main.tsx를 직접 불러 확인합니다.
    • react-dom/client의 createRoot만 대역으로 바꿔 실제 렌더는 하지 않습니다.
    • zod를 영어 문구로 되돌린 상태에서 시작하고, 그 초기화가 실제로 먹혔는지 먼저 확인합니다(헛통과 방지).
    • 부팅 뒤 메시지를 적지 않은 규칙의 오류가 한국어인지, #root에 한 번 렌더했는지 확인합니다.

테스트

  • main.tsx에서 installZodKorean(); 줄을 지우면 영어 메시지가 나와 실패하는 것을 확인했습니다.

플랜 대조

플랜 8번 불릿 상태
부팅이 zod 한국어 로캘을 설치하는지 테스트 한 것
부팅을 bootstrap() 함수로 분리 방식 변경: 분리하면 main.tsx에서 그 함수 호출이 빠지는 경우를 여전히 못 잡아, main.tsx를 직접 불러 확인했습니다
설치하지 않은 상태에서 시작하도록 격리, 호출을 빼면 실패 한 것

- 테스트 setup과 zod-locale spec이 installZodKorean()을 직접 불러서, main.tsx에서 호출이 빠져도 잡는 테스트가 없었음
- 부팅을 함수로 떼어 그 함수를 검사하면 main.tsx의 호출 자체는 여전히 비어 있으므로, main.tsx를 직접 import하는 spec으로 바꿈
  - react-dom/client의 createRoot만 stub, #root를 둔 뒤 zod를 영어 로캘·customError 없음으로 되돌리고 import
  - 메시지 없는 규칙(min(1))이 한국어 문구를 내고, #root로 render가 1회 불리는지 확인. 끝나면 한국어 설정을 다시 설치
- 회귀 1건(main.tsx의 installZodKorean() 줄을 지우면 영어 문구가 나와 실패 확인)
@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: CaQuick/caquick-admin-fe/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fabcd9f5-0828-46b5-92a5-92b7da7b29e0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 96.06% (🎯 80%) 2442 / 2542
🟢 Statements 95.53% (🎯 80%) 2675 / 2800
🟢 Functions 94.27% (🎯 80%) 1005 / 1066
🟢 Branches 88.06% (🎯 70%) 2014 / 2287
File CoverageNo changed files found.
Generated in workflow #130 for commit 0e1302e by the Vitest Coverage Report Action

@chanwoo7
chanwoo7 merged commit c1d0eb3 into develop Oct 4, 2026
10 checks passed
@chanwoo7
chanwoo7 deleted the test/boot-zod-locale branch October 4, 2026 15:49
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.

1 participant