gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 787 forks source link

Istanbul ignore not working on ES6 exports #762

Open WilliamHolmes opened 7 years ago

WilliamHolmes commented 7 years ago

It seems istanbul ignore (or next) is not working on export statements.

image image

osukaa commented 7 years ago

Are you using it through nyc? https://istanbul.js.org/docs/tutorials/es2015/

pghalliday commented 7 years ago

I ran into the same issue, and yes i am using nyc.

This doesn't work:

// istanbul ignore next
export function createKeys() {
  ...
}

This does work:

// istanbul ignore next
function createKeys() {
  ...
}

export {createKeys};
codef0rmer commented 6 years ago

This worked just fine 😊

export /* istanbul ignore next */ function createKeys() {
  ...
}