pocesar/grunt-mocha-istanbul

options.excludes does not seem to be working.

Opened this issue · 5 comments

image

image

does it make any difference if you start the excludes like **/webpack/bootstrap/* ? bootstrap is a folder I assume

Tried it, it makes no difference.

some things to try:

  • set the options.root to your srcs folder
  • use options.includes instead of options.excludes

I'm guessing webpack is a "virtual" module that doesn't actually exist as a file (since there's no extension in there), but exists as a module inside the code, either as a non static import, or lazy loaded

options.includes seems to work (excluding the files) but then it breaks remap-istanbul which is unable to find the source-map.

I'm transpiling into ./dist , which is also where the sourcemap file is located.

A solution I have found is to use a feature in remap-istanbul which has an option filter out files from the remapping and final report.

exclude: /webpack\/(bootstrap|universalModuleDefinition)/,

Try to use the file extension name under excludes Istanbul Options.
It will work.

As example:

 excludes: [
    '*.test.ts', '*.test.js'
 ],

or

 excludes: [
    '*.test.*'
 ],

I tried to use the directory path then it's not working. But it should work.
I also used the istanbuljs/nyc and see their directory path is working.