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
Read readme.md for detailed description of the issue
Generate JS coverage report via npm run test:js
Notice that report coverage/coverage-final.json contains the key b with the value {"0":[2,1],"1":[1,1]}, so the invocations of the contained if and else branches were tracked correctly
Generate TS coverage report via npm run test:ts
Notice that report coverage/coverage-final.json contains the key b with the value {"0":[2],"1":[1]}, so the invocations of the contained else branches were not tracked
Also notice that the report contains branchMap entries with missing locations for the else branches
Expected behavior
Both, the JS and TS, coverage reports should result in the same number of discovered branches and the same number of invocations of the else branches.
Actual behavior
The TS coverage report has a lower number of discovered branches, it seems that the else branches are missing.
Version
29.1.1
Steps to reproduce
npm run test:js
coverage/coverage-final.json
contains the keyb
with the value{"0":[2,1],"1":[1,1]}
, so the invocations of the containedif
andelse
branches were tracked correctlynpm run test:ts
coverage/coverage-final.json
contains the keyb
with the value{"0":[2],"1":[1]}
, so the invocations of the containedelse
branches were not trackedbranchMap
entries with missinglocations
for theelse
branchesExpected behavior
Both, the JS and TS, coverage reports should result in the same number of discovered branches and the same number of invocations of the
else
branches.Actual behavior
The TS coverage report has a lower number of discovered branches, it seems that the
else
branches are missing.Debug log
ts-jest.log
Additional context
It seems that the coverage instrumentation is correct but somewhere along the way invocations of the
else
branches in imported TS files are lost.Environment
The text was updated successfully, but these errors were encountered: