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: code coverage #1207

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft

chore: code coverage #1207

wants to merge 19 commits into from

Conversation

radupasparuga
Copy link
Collaborator

@radupasparuga radupasparuga commented Aug 11, 2024

Implemented changes

This PR adds code coverage to our cypress tests using Istanbul (https://github.com/ifaxity/vite-plugin-istanbul)

TODO:

How to use:

  • npm run test:component (this will generate a coverage and a .nyc_output folder that contain info about our code coverage

  • npm run nyc:report to show a summary of code coverage
    Screenshot 2024-09-22 at 14 04 33

  • opening coverage/lcov-report/index.html opens a nice interface where we can view coverage information for each file
    Screenshot 2024-09-22 at 14 03 33

  • coverage is also added as a step in our run-tests pipeline (https://github.com/EOX-A/EOxElements/actions/runs/10873667192/job/30170032260?pr=1207), the "Code coverage" step displays the output of the npm run nyc:report command and the "Upload code coverage" step uploads the coverage/lcov-report folder as an artifact
    Screenshot 2024-09-22 at 14 10 20

Closes #638

Screenshots/Videos

Checklist before requesting a review

Copy link

netlify bot commented Aug 11, 2024

Deploy Preview for eoxelements ready!

Name Link
🔨 Latest commit 1b41b15
🔍 Latest deploy log https://app.netlify.com/sites/eoxelements/deploys/66e733457ec4800008b42e2e
😎 Deploy Preview https://deploy-preview-1207--eoxelements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

Add code coverage checks for tests
1 participant