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

chore: Fix test coverage config #295

Merged
merged 1 commit into from
Mar 6, 2024
Merged

chore: Fix test coverage config #295

merged 1 commit into from
Mar 6, 2024

Conversation

just-boris
Copy link
Member

@just-boris just-boris commented Mar 5, 2024

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

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.73%. Comparing base (d5dd6dc) to head (18d2e07).

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.
📢 Have feedback on the report? Share it here.

"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",
Copy link
Member Author

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

@just-boris just-boris marked this pull request as ready for review March 5, 2024 16:38
@just-boris just-boris requested a review from a team as a code owner March 5, 2024 16:38
@just-boris just-boris requested review from cansuaa and removed request for a team March 5, 2024 16:38
@@ -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",
Copy link
Contributor

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?

Copy link
Member Author

@just-boris just-boris Mar 5, 2024

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

Copy link
Contributor

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

@just-boris just-boris requested a review from cansuaa March 5, 2024 18:14
@just-boris just-boris merged commit 9c5fa24 into main Mar 6, 2024
29 of 30 checks passed
@just-boris just-boris deleted the fix-coverage branch March 6, 2024 10:52
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