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
After switching from babel-jest to @swc/jest as jest transformer and after running the coverage again i saw some really different and higher numbers of coverage with @swc/jest.
I investigated for a bit and found the main cause to be that the module imports are reported as relevant and therefore covered lines aswell. This changes the coverage percentage of a bigger project drastically as shown in the reproduction linked.
Is this behaviour intended or did i miss something in the configs?
Thx in advance.
Input code
See reproduction repo.
Config
See reproduction repo.
Playground link (or link to the minimal reproduction)
Describe the bug
After switching from
babel-jest
to@swc/jest
as jest transformer and after running the coverage again i saw some really different and higher numbers of coverage with@swc/jest
.I investigated for a bit and found the main cause to be that the module imports are reported as relevant and therefore covered lines aswell. This changes the coverage percentage of a bigger project drastically as shown in the reproduction linked.
Is this behaviour intended or did i miss something in the configs?
Thx in advance.
Input code
See reproduction repo.
Config
See reproduction repo.
Playground link (or link to the minimal reproduction)
https://github.com/SimonMueller/swc-jest-coverage-repro
SWC Info output
Expected behavior
Same coverage report as with "babel-jest" transformer.
Actual behavior
Imports are reported as relevant lines and coverage report has other differences too which results in a much higher coverage than with "babel-jest".
Version
1.7.18
Additional context
No response
The text was updated successfully, but these errors were encountered: