0

I have a test setup configured with Mocha and nyc.

I'm trying to exclude a certain file from the report. So I tried this:

"nyc": {
    "exclude": [
      "./sites/modules/carousel-widget/",
    ]
  },

And it actually seems to works because the overall percentage moves up (from 48% to 60%). However, I can still see the file under file section in the report as if the above lines do not have any effect on this.

enter image description here

enter image description here I even tried the following. But it didn't work.

"test:coverage": "APOS_TEST=1 nyc --reporter=html mocha --file ./test/lib/setup.js \"test/**/*.{spec,test}.js\"  --ignore ./sites/modules/carousel-widget/",

How can I be able to get this excluded in the reports?

ABGR
  • 4,631
  • 4
  • 27
  • 49

0 Answers0