Getting a total line, branch, statement and function count per file in a TypeScript project

19 views Asked by At

I have a large React code base with ~3% code coverage. I'm trying to up the code coverage. I'm looking to inspire the rest of the team to write tests, so I'd like to raise the number quickly as possible by writing tests for the bigger files or the ones with the most branches. Jest counts all these numbers, but can I get a raw non-percentage number of branches, functions and lines per file?

I could guesstimate lines with wc -l by filtering out blanks with grep, but I'd rather just get the numbers Jest has internally.

0

There are 0 answers