Skip to content

test: only include src for coverage report#242

Merged
pi0 merged 1 commit intounjs:mainfrom
ysknsid25:chore/filter-coverage-target
Apr 3, 2025
Merged

test: only include src for coverage report#242
pi0 merged 1 commit intounjs:mainfrom
ysknsid25:chore/filter-coverage-target

Conversation

@ysknsid25
Copy link
Copy Markdown
Contributor

Codecov Errors are occurring due to low coverage.
https://github.com/unjs/c12/pull/239/checks?check_run_id=39566096830

The coverage target shows that even Playground is covered.

------------|---------|----------|---------|---------|-------------------------------------------------------------
File        | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                           
------------|---------|----------|---------|---------|-------------------------------------------------------------
All files   |   70.35 |    77.39 |   68.18 |   70.35 |                                                             
 playground |       0 |        0 |       0 |       0 |                                                             
  load.ts   |       0 |        0 |       0 |       0 | 1-13                                                        
  watch.ts  |       0 |        0 |       0 |       0 | 1-37                                                        
 src        |   75.29 |    78.76 |      75 |   75.29 |                                                             
  dotenv.ts |   70.88 |     92.3 |     100 |   70.88 | 108-138                                                     
  index.ts  |     100 |      100 |     100 |     100 |                                                             
  loader.ts |      93 |    80.89 |      70 |      93 | 144-148,222-223,241-243,251-257,315,336,341,404-405,424-425 
  types.ts  |      25 |      100 |       0 |      25 | 153-155                                                     
  update.ts |    87.5 |    45.45 |     100 |    87.5 | 41-42,53-56,63-64,67                                        
  watch.ts  |    8.24 |      100 |       0 |    8.24 | 54-151                                                      
------------|---------|----------|---------|---------|-------------------------------------------------------------

But isn't src/**.ts the only good thing we should be interested in?

-----------|---------|----------|---------|---------|-------------------------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                           
-----------|---------|----------|---------|---------|-------------------------------------------------------------
All files  |   75.29 |    78.76 |      75 |   75.29 |                                                             
 dotenv.ts |   70.88 |     92.3 |     100 |   70.88 | 108-138                                                     
 index.ts  |     100 |      100 |     100 |     100 |                                                             
 loader.ts |      93 |    80.89 |      70 |      93 | 144-148,222-223,241-243,251-257,315,336,341,404-405,424-425 
 types.ts  |      25 |      100 |       0 |      25 | 153-155                                                     
 update.ts |    87.5 |    45.45 |     100 |    87.5 | 41-42,53-56,63-64,67                                        
 watch.ts  |    8.24 |      100 |       0 |    8.24 | 54-151                                                      
-----------|---------|----------|---------|---------|-------------------------------------------------------------

Signed-off-by: ysknsid25 <kengo071225@gmail.com>
@ysknsid25 ysknsid25 changed the title chore: filter test coverage files chore(test): filter test coverage files Apr 2, 2025
Copy link
Copy Markdown
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thnx!

@pi0 pi0 changed the title chore(test): filter test coverage files test: only include src for coverage report Apr 3, 2025
@pi0 pi0 merged commit 0bb37f9 into unjs:main Apr 3, 2025
3 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.96%. Comparing base (42d9697) to head (381696d).
Report is 127 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #242      +/-   ##
==========================================
+ Coverage   76.92%   77.96%   +1.04%     
==========================================
  Files           7        6       -1     
  Lines         806      599     -207     
  Branches       80      109      +29     
==========================================
- Hits          620      467     -153     
+ Misses        184      132      -52     
+ Partials        2        0       -2     

☔ 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.

@ysknsid25
Copy link
Copy Markdown
Contributor Author

@pi0
If I find something similar in other UnJS projects, I'll fix it 🫡

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.

2 participants