clasp icon indicating copy to clipboard operation
clasp copied to clipboard

feat: Add code coverage reporting using c8

Open sqrrrl opened this issue 6 months ago • 0 comments

Adds a test:coverage script to package.json to enable code coverage analysis for unit tests using c8.

Key changes:

  • Added c8 as a dev dependency.
  • Modified the test:coverage script to run c8 --reporter=text --reporter=html --reporter=lcov mocha.
  • Verified that coverage data is collected and output to the console when npm run test:coverage is executed.
  • Ensured that npm run test and npm run lint continue to pass.

Note: While text-based coverage reporting is functional, I was unsuccessful in generating HTML/LCOV file-based reports despite attempts with both c8 and nyc.

Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion)

  • [ ] npm run test succeeds.
  • [ ] npm run lint succeeds.
  • [ ] Appropriate changes to README are included in PR.

sqrrrl avatar Jun 09 '25 21:06 sqrrrl