I apologize if I'm missing something obvious or if I'm repeating this issue.
The remapped coverage works in the browser:


The terminal is displaying the unmapped coverage, look at "branch" and "uncovered lines":

jest config in package.json

Remapped coverage displays in the terminal.
What am I missing?
Thanks in advance.
refer https://github.com/kulshekhar/ts-jest/issues/42#issuecomment-256792842 .
Thanks for the quick response. Sorry for the repeat question.
I've been trying to wrap my head around the current status of this, and I thought it'd be a good idea to jot down my current conclusions (both to inform others, and to double-check any incorrect assumptions I've made).
So, as far as I can tell, it is currently impossible for ts-jest to tell Jest what the correct coverage is (although it _can_ output the correct coverage to the developer, [currently])(https://github.com/kulshekhar/ts-jest/issues/61) in the remapped directory inside the coverage directory configured for Jest).
However, a PR has been accepted into Jest that should make this possible in the future. If the developer enables the mapCoverage option, then from Jest 20 onwards (we're at version 19 at the time of writing), ts-jest and other preprocessors should be able to report the actual coverage back to Jest. Or at least, the actual coverage as far as the source maps are accurate, which should be fine most of the time.
So for now, we'll have to wait for Jest 20, after which ts-jest can be extended to report the coverage back to Jest.
As a workaround until that time, I've created a small CLI-tool that you can point at your remapped coverage report to pass or fail a CI build depending on whether thresholds are met.
Thanks for the update and work around, much appreciated.
Coverage is no longer handled by ts-jest (see #200)
If this issue isn't addressed AND if you think the fix needs to be in ts-jest, feel free to either open a new issue or leave a comment here to reopen this.
Thanks for the update on this issue @kulshekhar
Unfortunately it does not work at the moment: https://github.com/kulshekhar/ts-jest/issues/211
Most helpful comment
I've been trying to wrap my head around the current status of this, and I thought it'd be a good idea to jot down my current conclusions (both to inform others, and to double-check any incorrect assumptions I've made).
So, as far as I can tell, it is currently impossible for ts-jest to tell Jest what the correct coverage is (although it _can_ output the correct coverage to the developer, [currently])(https://github.com/kulshekhar/ts-jest/issues/61) in the
remappeddirectory inside the coverage directory configured for Jest).However, a PR has been accepted into Jest that should make this possible in the future. If the developer enables the
mapCoverageoption, then from Jest 20 onwards (we're at version 19 at the time of writing), ts-jest and other preprocessors should be able to report the actual coverage back to Jest. Or at least, the actual coverage as far as the source maps are accurate, which should be fine most of the time.So for now, we'll have to wait for Jest 20, after which ts-jest can be extended to report the coverage back to Jest.
As a workaround until that time, I've created a small CLI-tool that you can point at your remapped coverage report to pass or fail a CI build depending on whether thresholds are met.