There is a tool called diff-cover that can check coverage for git diff. It takes XML coverage reports in Cobertura and compares with the output of git diff . It then reports the coverage information for the lines in diff.
I donβt see if grunt-mocha-cov can output Cobertura reports, but you should find some grunt plugin that does.
Note that diff-cover does not avoid unnecessary coverage tools for performance reasons.
source share