Exclude function (not an entire file) from JavaScript code coverage
Use below lines of code to ignore code for coverage.
/* istanbul ignore if */ ---skips the "if thing" in the source code
/* istanbul ignore else */ ---skips the "else thing" in the source code
/* istanbul ignore next */ ---skips the "next thing" in the source code
It appears that the guy behind Istanbul has added support for ignoring specific sections of code from coverage analysis. Really useful!
More here: https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md