Skip to content

CoverageTracker/example-typescript

Repository files navigation

example-typescript

coverage badge complexity badge duplication badge

A small, idiomatic TypeScript invoicing/cart library used as the JS/TS reference example for Coverage Tracker. It exists to give the JS/TS row in the coverage report generation guide a live, working reference, and to populate the demo dashboard with real trend data.

This is a demo/marketing repo, not a test suite for Coverage Tracker itself.

What's here

  • src/ — discount/cart calculations, currency formatting, and validation helpers, each with real branching logic.
  • test/ — a vitest suite with a deliberately uncovered branch or two, so branch_coverage < line_coverage shows up on the dashboard.
  • .github/workflows/coverage.yml — runs tests with coverage, generates a Lizard complexity report and a jscpd duplication report (a small duplicated block is seeded on purpose), then reports all three to the demo instance via the coverage-tracker reporting Action.

Running locally

npm ci
npm run coverage   # writes coverage/lcov.info

About

TypeScript demo project reporting coverage, complexity, and duplication to CoverageTracker via the reporting Action.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors