pocesar/grunt-mocha-istanbul

Add option to return zero exit code if unit tests fail

Closed this issue · 2 comments

ngeor commented

I would like to be able to specify an option like "noFail: true" (same as the grunt-mocha-test package supports), that will make grunt-mocha-istanbul return zero exit code even if some of the unit tests fail.

The use case is when running grunt-mocha-istanbul within a CI (Jenkins, TeamCity, etc) server. In that context, the CI server often reports a broken build without any extra information, because it interprets the non-zero exit code as something severe. If a unit test fails, I would like to give the CI tool the chance to consume the code coverage report that istanbul generates and let the CI tool break the build due to the subsequent low code coverage.

this is related to #37, I agree and think it's reasonable to not hard fail in some cases, I'll see how to implement this (ignoring the error from the forked processes)

ngeor commented

Not needed anymore.