Skip to content

TaskBounty Research

JavaScript and TypeScript test coverage: a 241-repo study

We measured the public test coverage of 241 JavaScript and TypeScript repositories that publish a coverage badge, then read each badge for the real number. The headline looks great and is also a trap.

Key findings

  • Median line coverage across the 241 repositories was 96 percent.
  • Mean line coverage was 86.4 percent, pulled down by a small low-coverage tail.
  • 90.5 percent of the repositories sat above 60 percent coverage.
  • The JavaScript and TypeScript split was almost even: 121 JavaScript, 120 TypeScript.
  • Only 15 repositories (6 percent) fell in the 40 to 65 percent band, and the most popular of those had just 276 stars.
  • The takeaway: publishing a coverage badge is itself a strong signal of an already-tested codebase. The real coverage gap lives in repositories that do not publish one.

The distribution

Coverage bandRepositoriesShare
0 to 25 percent104.1%
25 to 50 percent62.5%
50 to 75 percent2410.0%
75 to 90 percent4317.8%
90 to 100 percent15865.6%

Why the 96 percent is a trap

A repository only enters this dataset if it publishes a public coverage badge. Teams that wire up Codecov and put a badge in the README are, almost by definition, teams that already care about coverage and have already done the work. The badge is a flex. You do not advertise a number you are ashamed of. So this is not the coverage of JavaScript and TypeScript projects. It is the coverage of the projects whose maintainers chose to show it.

The projects with a real coverage gap, the private company codebases and the open-source projects with no badge, are exactly the ones missing from a study like this. Their real number tends to be a lot lower than 96 percent, and nobody has measured it recently.

Open data

The full per-repo dataset (repo, stars, coverage, provider, language) is free to download and reuse under CC BY 4.0. No personal data.

Method

We searched public READMEs for Codecov, Coveralls, and SonarCloud badge links, kept the JavaScript and TypeScript repositories, and read the coverage value each provider exposes. We recorded 241 repositories with a readable number. This is a convenience sample of badge-publishing projects, not a random sample of all repositories, and the selection bias above applies throughout. Counts are point-in-time as of June 2026.

Want your own number instead of the ecosystem average? Check a public repo free or run a read-only scan on a private one. We clone it, run its suite, and report the real figure plus the files where new tests cut the most risk.