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
For v1.4.0, istanbul shows exported string constants as not covered. This is a deviation from v0.34.6 where it correctly skips string constants in code coverage.
I see. Thanks for the info! Will close this issue.
However, is it valid for coverage to be collected for an exported string constant (or an exported number or boolean)? Would the recommendation be to write a test that checks if the value is as expected 🤔? I just wanted to export a public constant from my package and it feels weird to write a test to check its value.
You can use ignore hints or coverage.exclude for this. Personally I think I would add test case for the file that actually imports this file. Then it would become covered automatically.
Describe the bug
For v1.4.0, istanbul shows exported string constants as not covered. This is a deviation from v0.34.6 where it correctly skips string constants in code coverage.
Is this an expected change in behavior? Or a bug?
Reproduction
See terminal for coverage results:
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: