Iladarsda
Iladarsda

Reputation: 10696

Karma - Instanbul - console.log being counted as test?

I noticed that Karma/Istanbul is marking console.log() as covered testcase? Is there anyway we can make Istanbul to skip console.log()?

I could just remove or rename the console.log, but I am interested if there are such options in Istanbul?

Here is an example: enter image description here

Upvotes: 1

Views: 504

Answers (1)

SO User
SO User

Reputation: 123

If you want to ignore some statements from coverage report use special formed comments:

https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md

Upvotes: 1

Related Questions