vendredi 8 juillet 2016

Failing unit tests in javascript if karma coverage drops below threshold

I am using the following setup - karma, webpack, mocha, PhantomJS for testing my React components. I am using the following website as reference - http://ift.tt/29H8Vo6

From the karma threshold coverage help - http://ift.tt/29Az45f, I was able to get the coverage threshold limit. My only problem is that the test says succeeded even if the coverage drops below the threshold limit. I get errors saying 'Coverage for statements (92.31%) does not meet global threshold', but I would essentially like the tests to fail.

Is that possible?

Aucun commentaire:

Enregistrer un commentaire