test: 앱 부팅이 zod 한국어 문구를 설치하는지 고정 - #65
Merged
Merged
Conversation
- 테스트 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() 줄을 지우면 영어 문구가 나와 실패 확인)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Coverage Report
File CoverageNo changed files found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
main.tsx가 부팅 때installZodKorean()을 부르지만, 이를 잡는 테스트가 없었습니다.zod-locale.spec이 직접 설치하므로,main.tsx에서 호출이 빠져도 CI가 알 수 없었습니다.변경
src/main.spec.ts를 추가했습니다.main.tsx를 직접 불러 확인합니다.react-dom/client의createRoot만 대역으로 바꿔 실제 렌더는 하지 않습니다.#root에 한 번 렌더했는지 확인합니다.테스트
main.tsx에서installZodKorean();줄을 지우면 영어 메시지가 나와 실패하는 것을 확인했습니다.플랜 대조
bootstrap()함수로 분리main.tsx에서 그 함수 호출이 빠지는 경우를 여전히 못 잡아,main.tsx를 직접 불러 확인했습니다