Add a test:coverage script and document the coverage thresholds
Description
jest.config.ts enforces per-file coverage thresholds (100% on many components/lib modules, near-100% locks on format.ts/theme.ts) plus a global floor, but package.json has no test:coverage script, so contributors must remember jest --coverage and have no documented map of which files are gated. This issue adds the convenience scripts and a short doc so the 95%-coverage expectation in every issue is easy to verify locally.
Requirements and context
- Repository scope: Agentpay-Org/Agentpay-frontend only.
- Add
test:coverage (and optionally test:watch) scripts to package.json running Jest with --coverage.
- Document, in
README.md or a new docs/testing.md section, the per-file thresholds in jest.config.ts and how to read the text/lcov reports.
- Do not change the existing thresholds or test setup; this is tooling + docs only.
- Confirm the new script runs the existing suite without altering results.
Suggested execution
- Fork the repo and create a branch
git checkout -b docs/tooling-coverage-scripts
- Implement changes
- Write code in:
package.json (scripts only).
- Write comprehensive tests in: not applicable; instead run
npm run test:coverage and confirm the gates pass.
- Add documentation: add the coverage section to
README.md referencing jest.config.ts.
- Validate the script name does not clash with existing scripts.
- Test and commit
Test and commit
- Run
npm run lint, npm test, and npm run test:coverage.
- Confirm the documented thresholds match the
coverageThreshold block in jest.config.ts.
- Include the coverage summary output.
Example commit message
docs(tooling): add test:coverage script and document coverage gates
Guidelines
- Accuracy over completeness; documented thresholds must match the config.
- Clear, reviewer-focused documentation.
- Timeframe: 96 hours.
Community & contribution rewards
- 💬 Join the AgentPay community on Discord for questions, reviews, and faster merges: https://discord.gg/eXvRKkgcv
- ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.
Add a test:coverage script and document the coverage thresholds
Description
jest.config.tsenforces per-file coverage thresholds (100% on many components/lib modules, near-100% locks onformat.ts/theme.ts) plus a global floor, butpackage.jsonhas notest:coveragescript, so contributors must rememberjest --coverageand have no documented map of which files are gated. This issue adds the convenience scripts and a short doc so the 95%-coverage expectation in every issue is easy to verify locally.Requirements and context
test:coverage(and optionallytest:watch) scripts topackage.jsonrunning Jest with--coverage.README.mdor a newdocs/testing.mdsection, the per-file thresholds injest.config.tsand how to read thetext/lcovreports.Suggested execution
git checkout -b docs/tooling-coverage-scriptspackage.json(scripts only).npm run test:coverageand confirm the gates pass.README.mdreferencingjest.config.ts.Test and commit
npm run lint,npm test, andnpm run test:coverage.coverageThresholdblock injest.config.ts.Example commit message
docs(tooling): add test:coverage script and document coverage gatesGuidelines
Community & contribution rewards