fix: 릴리즈 리뷰 반영 (ReviewableOrderItemRow 명시 타입·매핑 테스트 보강) - #190
Conversation
- listReviewableOrderItems 반환 타입을 명시적 row 인터페이스 (ReviewableOrderItemRow)로 선언해 UserReviewService 매핑 계약을 고정 (레포의 다른 repository row 타입 컨벤션과 통일). - 카드 매핑 테스트에 productId·pickedUpAt(고정 시각) 검증 추가.
|
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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 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 |
🧹 knip — dead-code 리포트전체 리포트
|
🩺 NestJS Doctor — 89/100 (Good)진단 277건 (error 0).
architecture / security 상위 항목
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Coverage report
Test suite run success1552 tests passing in 182 suites. Report generated by 🧪jest coverage report action from aa643ea |
배경
릴리즈 PR #189에서 CodeRabbit이 남긴 지적 2건을 반영합니다. 릴리즈 리뷰 절차에 따라 main 직접 커밋 없이 develop 경유로 처리합니다.
반영 내용
1.
listReviewableOrderItems반환 타입 명시화 — 기존에는 Prismaselect결과의 타입 추론에 의존하고 있어서, 나중에 select 절이 바뀌면UserReviewService의 매핑 계약이 소리 없이 약해질 수 있었습니다. 이 레포의 다른 repository들(MyOrderRow,CakeCandidateRow등)처럼 명시적 row 인터페이스ReviewableOrderItemRow를 정의하고Promise<{ items: ReviewableOrderItemRow[]; totalCount: number }>로 선언했습니다. 동작 변경은 없습니다.2. 카드 매핑 테스트 보강 — 기존 매핑 테스트가
productId와pickedUpAt을 검증하지 않아 두 필드의 매핑이 깨져도 테스트가 통과할 수 있었습니다. 고정 픽업 시각을 fixture에 넣고 두 필드를 함께 assert하도록 보강했습니다.검증
user-review.service.spec.ts25건 통과 (매핑 테스트에 productId·pickedUpAt 검증 추가).