istanbuljs / babel-plugin-istanbul

A babel plugin that adds istanbul instrumentation to ES6 code
BSD 3-Clause "New" or "Revised" License
616 stars 72 forks source link

Is there any way to look for coverage in one specific folder and not in whole code base in project #248

Closed gauravgandhi15 closed 3 years ago

coreyfarrell commented 4 years ago

The best way is to set the include option, for example:

{
  "plugins": [
    ["babel-plugin-istanbul", {
      "include": ["src/**]
    }]
  ]
}

Alternatively you can set include/exclude options to the standard nyc configs, the nyc configs will be loaded if you don't set any options through your babelrc.