clasp
clasp copied to clipboard
feat: Add code coverage reporting using c8
Adds a test:coverage script to package.json to enable code coverage analysis for unit tests using c8.
Key changes:
- Added
c8as a dev dependency. - Modified the
test:coveragescript to runc8 --reporter=text --reporter=html --reporter=lcov mocha. - Verified that coverage data is collected and output to the console when
npm run test:coverageis executed. - Ensured that
npm run testandnpm run lintcontinue 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 testsucceeds. - [ ]
npm run lintsucceeds. - [ ] Appropriate changes to README are included in PR.