grunt-mocha-istanbul icon indicating copy to clipboard operation
grunt-mocha-istanbul copied to clipboard

If the "check" requirements are not met, the coverage method is never called

Open OverloadUT opened this issue 9 years ago • 4 comments

If the "check" requirements are not met, the coverage method is never called.

The problem with this is that it means that you will never get coveralls.io to see your coverage when it's below the required threshold. This is when you would MOST want to be able to see the details of the coverage.

Right now I am having to put check at zero to force it to always go to coveralls.io, but this means that my Travis CI build shows passing when I would in fact like it to be failing when the coverage isn't good enough.

At least make it an option maybe?

OverloadUT avatar Jul 04 '15 01:07 OverloadUT

does it work with --force? because that's the desired behavior, it should never continue if the coverage threshold isn't met, since it won't generate coverage files if it fails, therefore we could not trigger the coverage event.

this would need to be refactor to allow the coverage files to be created and event emitted regardless of the threshold, but would break current implementations

pocesar avatar Jul 04 '15 06:07 pocesar

I thought of that - the problem with --force is that it causes failures to no longer return error codes, and therefore Travis sees everything as successful.

OverloadUT avatar Jul 04 '15 06:07 OverloadUT

could implement a new option hardFail (that defaults to true), else it will only emit a warning and won't stop further tasks

pocesar avatar Aug 09 '15 14:08 pocesar

Thanks for linking to the issue I opened! Indeed they seem quite similar. Consider calling the new option noFail (that defaults to false).

ngeor avatar Sep 22 '16 16:09 ngeor