check-code-coverage icon indicating copy to clipboard operation
check-code-coverage copied to clipboard

Extend check-total to look beyond statements and read from Nyc config like .nycrc

Open kamathvikram opened this issue 1 year ago • 1 comments

Extend check-total to look beyond statements. It appears, at the moment, check-total only checks against statements and not against lines, functions or branches.

check-total --from coverage/coverage-summary.json --min 80

Expected

Also support

check-total --from coverage/coverage-summary.json --min 80 --functions 63 --branches 53

Which would check against lines, functions and branches as well.

Additionally, if .nycrc is present then it can read the thresholds if not provided on cli.

kamathvikram avatar Jan 16 '24 19:01 kamathvikram

an alternative you should use npx nyc check-coverage for reading the nycrc

zodman avatar Jun 24 '24 18:06 zodman