Istanbul nyc to exclude test files

后端 未结 1 490
感动是毒
感动是毒 2021-02-18 14:37

I\'m currently getting my test files in the final coverage. That\'s probably because they sit alongside my components instead of having their own test folder. H

相关标签:
1条回答
  • 2021-02-18 15:07

    Right, after some digging I've managed to get this working. I've added

    "nyc": { "include": "app", - only looks in the app folder "exclude": "**/*.spec.js" }

    to my package.json. Since I'm using webpack I'll probably try and find a way of defining this rule in the webpack.config file (if possible at all). I'll come back if I get an answer to this.

    0 讨论(0)
提交回复
热议问题