Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 1.96 KB

File metadata and controls

35 lines (28 loc) · 1.96 KB

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