Skip to content

Comments

[fix] jest.config.js 인식 위해 coverage 스크립트에 설정 파일 경로 추가#431

Merged
oesnuj merged 11 commits intodevelop-fefrom
fix/#430-coverage-svg-import-error-FE-120
May 20, 2025
Merged

[fix] jest.config.js 인식 위해 coverage 스크립트에 설정 파일 경로 추가#431
oesnuj merged 11 commits intodevelop-fefrom
fix/#430-coverage-svg-import-error-FE-120

Conversation

@oesnuj
Copy link
Member

@oesnuj oesnuj commented May 20, 2025

#️⃣ 연관된 이슈

#430

🐞 문제 발생 원인

  • 이전 PR에서 .svg import 문제를 해결하기 위해 jest.config.jsjest-transform-stub을 설정함
  • npm run test 명령에서는 해당 설정이 정상 적용되어 문제가 발생하지 않음
  • 그러나 npm run coverage에서는 동일한 < token 오류가 재발함
  • 이는 Jest가 coverage 명령 실행 시 jest.config.js를 자동으로 인식하지 못해 설정이 적용되지 않았기 때문ㅁ

image

🛠️ 해결 과정

  • 문제의 원인을 분석한 결과, Jest가 coverage 실행 시 별도 설정을 요구한다는 점을 파악
  • package.json 내 coverage 스크립트를 수정:
    "coverage": "jest --coverage --config jest.config.js"
    
    

Summary by CodeRabbit

  • Chores

    • Jest 커버리지 스크립트가 명시적으로 설정 파일(jest.config.js)을 사용하도록 업데이트되었습니다.
    • Codecov 통합을 위한 새로운 설정 파일이 추가되어 PR 코멘트 레이아웃이 개선되고, 변경 사항 및 베이스 커밋 요구 조건이 완화되었습니다.
  • Style

    • 불필요한 TODO 주석이 제거되었습니다.

@oesnuj oesnuj requested a review from seongwon030 May 20, 2025 03:07
@netlify
Copy link

netlify bot commented May 20, 2025

Deploy Preview for moadong ready!

Name Link
🔨 Latest commit 0137cc4
🔍 Latest deploy log https://app.netlify.com/projects/moadong/deploys/682c390a24cd3c0008e901ad
😎 Deploy Preview https://deploy-preview-431--moadong.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 40
Accessibility: 87
Best Practices: 92
SEO: 92
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 20, 2025

Caution

Review failed

The pull request is closed.

"""

Walkthrough

이 변경사항은 frontend/package.json의 coverage 스크립트에 --config jest.config.js 옵션을 추가하여 Jest 커버리지 실행 시 명시적으로 설정 파일을 사용하도록 했습니다. 또한 Codecov 통합을 위한 codecov.yml 파일이 추가되었으며, 주석만 삭제된 코드 정리가 포함되어 있습니다.

Changes

파일/경로 변경 요약
frontend/package.json coverage 스크립트에 --config jest.config.js 옵션 추가
frontend/codecov.yml Codecov 설정 파일 신규 추가, PR 코멘트 및 브랜치 제한 등 설정
frontend/src/App.tsx 주석(TODO) 삭제, 기능적 변경 없음
frontend/jest.config.js JSDoc 주석 뒤에 빈 줄 추가, 기능적 변경 없음

Sequence Diagram(s)

해당 변경은 설정 및 주석 정리에 국한되어 있어 시퀀스 다이어그램 생성이 필요하지 않습니다.

Assessment against linked issues

Objective Addressed Explanation
npm run coverage 스크립트에 --config jest.config.js 명시 (FE-120)
Windows 및 CI 환경에서 coverage 명령 정상 실행 확인 (FE-120) 코드상 명시적 옵션 추가만 확인됨, 실제 환경 미확인
npm run test, npm run coverage 모두 통과 확인 (FE-120) 코드상으로는 테스트 실행 보장 여부 미확인

Possibly related issues

  • Moadong/moadong#430: coverage 스크립트의 Jest 설정 누락 문제를 동일하게 다루고 있어 본 PR과 직접적으로 연관됨.

Possibly related PRs

  • #422: Jest 설정에서 SVG import 처리를 다루며, 본 PR은 coverage 명령에서 설정 파일 명시로 관련성이 높음.
  • #333: coverage 스크립트 추가 및 테스트 관련 변경으로, coverage 스크립트 변경과 관련 있음.
  • #341: Codecov 통합 관련 작업으로, 본 PR의 Codecov 설정 추가와 관련 있음.

Suggested reviewers

  • seongwon030
    """

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2e18bb9 and 0137cc4.

📒 Files selected for processing (1)
  • frontend/codecov.yml (1 hunks)

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@oesnuj oesnuj added ✅ Test test 관련(storybook, jest...) 💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정 labels May 20, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/codecov.yml (1)

10-10: 파일 끝에 개행 추가
YAMLLint의 new-line-at-end-of-file 오류를 해결하려면 파일 마지막에 개행 문자를 추가하세요.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 10-10: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 532e407 and e6f72ac.

📒 Files selected for processing (1)
  • frontend/codecov.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
frontend/codecov.yml

[error] 10-10: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (2)
frontend/codecov.yml (2)

1-3: CI 통과 필수 요구
require_ci_to_pass: yes 설정으로 CI가 성공해야만 Codecov 보고가 승인됩니다. 변경 의도와 일치하므로 승인합니다.


4-10: 브랜치 및 레이아웃 설정 검증 요청
comment 섹션의 layout: "reach,diff,flags,files,footer"require_changes: false 설정이 의도한 대로 동작하는지 확인하세요.
특히 branches에 나열된 develop-femain 브랜치명이 실제 브랜치명과 일치하는지 재확인해 주세요.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 10-10: no new line character at the end of file

(new-line-at-end-of-file)

@oesnuj oesnuj closed this May 20, 2025
@oesnuj oesnuj reopened this May 20, 2025
Copy link
Member

@seongwon030 seongwon030 left a comment

Choose a reason for hiding this comment

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

경로 추가 좋아요~

@oesnuj oesnuj merged commit 79d2856 into develop-fe May 20, 2025
4 of 5 checks passed
@oesnuj oesnuj deleted the fix/#430-coverage-svg-import-error-FE-120 branch May 21, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정 ✅ Test test 관련(storybook, jest...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants