You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while writing tests for a provider with coverage reports on, I noticed this behavior:
If there are no resources, this is detected correctly as "Total resources: 0, Touched resources: 0", but the resources coverage is NaN%. The code coverage check then fails:
expected: >= 100.0
got: 0.0
As the test doesn't really have a meaning if there are no resources, I implemented a check if the total is zero, setting the coverage to 100% if so and opened pull request #802 .
Though 100% is as wrong as 0%, it seems to be more useful as it does not generate meaningless failed tests.
Best regards,
Jan-Martin
The text was updated successfully, but these errors were encountered:
Hi,
while writing tests for a provider with coverage reports on, I noticed this behavior:
If there are no resources, this is detected correctly as "Total resources: 0, Touched resources: 0", but the resources coverage is NaN%. The code coverage check then fails:
As the test doesn't really have a meaning if there are no resources, I implemented a check if the total is zero, setting the coverage to 100% if so and opened pull request #802 .
Though 100% is as wrong as 0%, it seems to be more useful as it does not generate meaningless failed tests.
Best regards,
Jan-Martin
The text was updated successfully, but these errors were encountered: