Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can missing else blocks be globally ignored in Istanbul

Tags:

istanbul

I have code that has multiple if statements but no corresponding else statements. I have been adding /* istanbul ignore else */ individually for all these if statements in order to ignore the corresponding missing else blocks. Is there are way to ignore all the missing else statement?

like image 766
Anobika Avatar asked Aug 20 '15 05:08

Anobika


1 Answers

Per the current Istanbul documentation:

  1. The way to ignore an "else path" coverage is: (/* istanbul ignore else */

  2. In Ideas for Later the author is considering adding " "default-excludes": true," to the configuration file.

BOTTOM LINE:

it appears that in the current version, you must add /* istanbul ignore else */ to each block you wish to exclude.

like image 134
paulsm4 Avatar answered Sep 28 '22 20:09

paulsm4