Search code examples
javascriptcode-coveragebabeljsistanbulnyc

Istanbul coverage issue "else path not taken" but clearly is


I have this piece of code below, and I am using nyc and babel to create a coverage report.

For some reason the report is giving me an issue "else path not taken" but there's nothing I can do to stop this.

Why is this here? How can I make it go away?

enter image description here


Solution

  • This is because I didn't have any code that was continuing past all of these returns. I moved the return false to the bottom and it worked.