'how to remove snapshot's consideration from coverage report generation in jest
See the demo app by doing npm run test:2 https://github.com/adamchenwei/jest-playground.git
You will see the App.js is 100% covered, and it only really has a snapshot.
Are there ways we can tell Jest to ignore snapshot as coverage evidence? Or its what expected?
I haven't been able to find any answers online or even questions been asked, I suspect its either I am asking the wrong question or people consider 100% coverage snapshot as normal, while I feel its render coverage report meaningless in a sense that it only test the template matching from the previous component.
Solution 1:[1]
"jest": {
"coveragePathIgnorePatterns": [
".*__snapshots__/.*"
],
...
},
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | fransoudelaar |
