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
As it turns out, it's not just .tsx files that are not being tracked by Jest coverage; it's all files that the tests don't cover.
It seems counter-intuitive to me, but I guess this is the default behavior for Jest coverage. Any files that the tests don't reach are completely ignored.
Since we mostly just have tests only for the .ts files (ie helper files which were converted from Angular services), and we don't have a lot of React component testing yet, our actual coverage % should be much lower.
I'm going to start an issue for this. In the meantime, I think we shouldn't put too much stock in the coverage %.
We set collectCoverage: true in the Jest config. But we don't have collectCoverageFrom.
When collectCoverageFrom is not given, Jest only considers files that were reached by the tests.
I think we should set collectCoverageFrom as follows:
In e-mission/e-mission-phone#1138 (comment), I noticed that coverage % dropped when I added more tests. I thought that was strange, so I started investigating.
We set
collectCoverage: true
in the Jest config. But we don't havecollectCoverageFrom
.When
collectCoverageFrom
is not given, Jest only considers files that were reached by the tests.I think we should set
collectCoverageFrom
as follows:@jiji14 can you handle this?
The text was updated successfully, but these errors were encountered: