There is a configuration "per-file" that exists in code-coverage libraries such as c8 and nyc that allows restricting code coverage metric thresholds per each file rather than in the aggregate or summary of all files. It would be very nice to have this feature in the test-runner code coverage.
Here's an example for why someone would want this feature. Let's say you have the following coverage config and code coverage summary:
This code coverage passes because the "All files" summary percentages are all above 30%. However, if you set "perFile" to true, then this code coverage would fail because the notcovered.js file is only at 0%.
I am willing to implement this myself. I have always had "per-file" turned on in the past, so I would like to be able to use it here as well.
There is a configuration "per-file" that exists in code-coverage libraries such as c8 and nyc that allows restricting code coverage metric thresholds per each file rather than in the aggregate or summary of all files. It would be very nice to have this feature in the test-runner code coverage.
Here's an example for why someone would want this feature. Let's say you have the following coverage config and code coverage summary:
This code coverage passes because the "All files" summary percentages are all above 30%. However, if you set "perFile" to true, then this code coverage would fail because the notcovered.js file is only at 0%.
I am willing to implement this myself. I have always had "per-file" turned on in the past, so I would like to be able to use it here as well.