Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix code coverage #1847

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix code coverage #1847

wants to merge 1 commit into from

Conversation

cenfun
Copy link

@cenfun cenfun commented Nov 6, 2024

Fixed code coverage report for node test runner with mcr

NOTE:
Please help to Adding the Codecov token for reporting coverage to Codecov. @jonathanong

Following reports will be generated after running npm run test:coverage

  • console-details
[MCR] Koa Coverage Report
┌────────────────────┬──────────┬────────────┬──────────┬───────────┬──────────┬─────────────────┐
│ Name               │    Bytes │ Statements │ Branches │ Functions │    Lines │ Uncovered Lines │
├────────────────────┼──────────┼────────────┼──────────┼───────────┼──────────┼─────────────────┤
│ lib                │          │            │          │           │          │                 │
│ ├ application.js   │  99.81 % │   100.00 % │  97.67 % │  100.00 % │  99.38 % │ 239             │
│ ├ context.js       │  99.11 % │   100.00 % │  63.33 % │  100.00 % │  97.58 % │ 141-143         │
│ ├ only.js          │ 100.00 % │   100.00 % │ 100.00 % │  100.00 % │ 100.00 % │                 │
│ ├ request.js       │ 100.00 % │   100.00 % │  70.24 % │  100.00 % │ 100.00 % │                 │
│ ├ response.js      │ 100.00 % │   100.00 % │  57.60 % │  100.00 % │ 100.00 % │                 │
│ └ search-params.js │ 100.00 % │   100.00 % │ 100.00 % │  100.00 % │ 100.00 % │                 │
├────────────────────┼──────────┼────────────┼──────────┼───────────┼──────────┼─────────────────┤
│ Summary            │  99.85 % │   100.00 % │  72.84 % │  100.00 % │  99.57 % │                 │
└────────────────────┴──────────┴────────────┴──────────┴───────────┴──────────┴─────────────────┘
  • v8
    see html report coverage-reports/index.html
  • v8-json
    review file coverage with VScode extension directly.
  • codecov
    generate native Codecov coverage data file (will upload to Codecov)

see coverage config mcr.config.js

Checklist

  • I have ensured my pull request is not behind the main or master branch of the original repository.
  • I have rebased all commits where necessary so that reviewing this pull request can be done without having to merge it first.
  • I have written a commit message that passes commitlint linting.
  • I have ensured that my code changes pass linting tests.
  • I have ensured that my code changes pass unit tests.
  • I have described my pull request and the reasons for code changes along with context if necessary.

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.56%. Comparing base (b89e19a) to head (8bebae3).
Report is 22 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1847      +/-   ##
==========================================
- Coverage   99.61%   99.56%   -0.05%     
==========================================
  Files           5        6       +1     
  Lines         520      928     +408     
  Branches      147        2     -145     
==========================================
+ Hits          518      924     +406     
  Misses          2        2              
- Partials        0        2       +2     

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

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.

1 participant