Tuesday 16 May 2017

Fail code coverage if no tests exist for code

I have a simple Node JS application and am using Istanbul with Mocha to generate code coverage reports. This is working fine.

If I write a new function, but do not create any tests for it (or even create a test file) is it possible to check for this?

My ultimate goal is for any code which has no tests at all to be picked up by our continuous integration process and for it to fail that build.

Is this possible?



via Jon Hunter

No comments:

Post a Comment