Skip to content

Conversation

@nicknovitski
Copy link
Member

@nicknovitski nicknovitski commented Jun 20, 2025

Why

By default jest will only track coverage stats for files imported by a test. What about files that are never imported by any test? They aren't included in the report. But it would be better to include them and mark them as having 0% coverage.

Test Plan

Codecov in CI will show a difference in the results.

e: It looks like it adds two untested source files to coverage, and removes two test files from it.

Copy link
Member Author

nicknovitski commented Jun 20, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Jun 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.89%. Comparing base (850fa2b) to head (8573695).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #299      +/-   ##
==========================================
- Coverage   99.78%   97.89%   -1.89%     
==========================================
  Files          77       77              
  Lines        1879     1903      +24     
  Branches      251      254       +3     
==========================================
- Hits         1875     1863      -12     
- Misses          4       40      +36     
Flag Coverage Δ
integration 97.89% <ø> (-1.89%) ⬇️
unittest 97.89% <ø> (-1.89%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

By default, files not loaded from any test will not effect coverage
metrics, although actually we want them to be counted as uncovered.
@nicknovitski nicknovitski force-pushed the 06-20-chore_explicitly_list_files_to_collect_coverage_from branch from 13a1326 to 8573695 Compare June 20, 2025 21:14
Copy link
Member

@wschurman wschurman left a comment

Choose a reason for hiding this comment

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

awesomesauce

@nicknovitski nicknovitski merged commit 64057b6 into main Jun 23, 2025
3 of 4 checks passed
@nicknovitski nicknovitski deleted the 06-20-chore_explicitly_list_files_to_collect_coverage_from branch June 23, 2025 22:46
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