Skip to content

Conversation

@NatoBoram
Copy link
Owner

@NatoBoram NatoBoram commented Jun 3, 2025

📝 Description

I've always wanted to show a coverage badge. This lib has very high coverage, so it should be great to test it there.

  • Get code coverage with Vitest
  • Upload it to GitHub Pages in main
  • Submit dependencies in PRs

📓 References

@NatoBoram NatoBoram self-assigned this Jun 3, 2025
@NatoBoram NatoBoram marked this pull request as ready for review June 3, 2025 04:19
Copilot AI review requested due to automatic review settings June 3, 2025 04:19
@NatoBoram NatoBoram merged commit c286e19 into main Jun 3, 2025
2 checks passed
@NatoBoram NatoBoram deleted the feature/coverage branch June 3, 2025 04:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds code coverage reporting via Vitest and integrates coverage artifacts into CI and GitHub Pages.

  • Configure Vitest to collect and report coverage in multiple formats.
  • Update ESLint, Prettier, and workflows to ignore or include the new coverage output.
  • Add scripts and dependencies for running coverage locally and in CI.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vitest.config.ts Setup Vitest coverage includes and reporters
tsconfig.eslint.json Include Vitest config in ESLint type checking
package.json Add test:coverage script and coverage dependencies
eslint.config.ts Remove global ESLint disables and ignore coverage/
.prettierignore Ignore coverage/ in Prettier
.github/workflows/node.js.yaml Run coverage in CI and upload artifact
.github/workflows/github-pages.yaml Generate coverage in Pages build
Comments suppressed due to low confidence (2)

vitest.config.ts:8

  • Consider adding coverage thresholds (e.g. using watermarks or coverageThreshold in Vitest) to enforce minimum coverage and fail the build if the threshold is not met.
coverage: {

eslint.config.ts:5

  • [nitpick] Removing the global eslint-disable for no-unsafe-argument and no-unsafe-member-access might surface new lint errors in this config; consider scoping disables to specific lines or ensuring all calls comply with type safety.
/* eslint-disable @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access */

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