-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: Fix test coverage config #295
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #295 +/- ##
===========================================
+ Coverage 39.30% 83.73% +44.43%
===========================================
Files 60 60
Lines 1636 1666 +30
Branches 428 446 +18
===========================================
+ Hits 643 1395 +752
+ Misses 838 271 -567
+ Partials 155 0 -155 ☔ View full report in Codecov by Sentry. |
5fe50e8
to
65a2f58
Compare
"start:watch:css": "chokidar \"./src/**/*.scss\" -c \"npm run build:src:css\"", | ||
"build:pkg": "node scripts/package-json.js", | ||
"build:src:js": "tsc -p tsconfig.json", | ||
"build:src:js": "tsc -p tsconfig.json --inlineSources --sourceMap", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Source maps are required to resolve test coverage for imports from lib/components/
path. Also, nice dev experience improvement for our consumers
@@ -22,10 +22,10 @@ | |||
"preview": "vite preview", | |||
"start": "run-p start:server start:watch:ts start:watch:css", | |||
"start:server": "vite", | |||
"start:watch:ts": "tsc --watch", | |||
"start:watch:ts": "npm run build:src:js -- --watch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an additional --
after build:src:js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is the way it works: https://docs.npmjs.com/cli/v9/commands/npm-run-script
You split arguments to npm
and arguments you want to pass down to the script, tsc
in this case, with double dash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks for explaining
Description
Fix test coverage configuration. Not all files were collected for the coverage
Related links, issue #, if available: n/a
How has this been tested?
Codecov report speaks for itself. 39.30% on the mainline and 83.73% in this PR
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.