{"action":"created","issue":{"url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/25","repository_url":"https://api.github.com/repos/kulshekhar/ts-jest","labels_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/25/comments","events_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/25/events","html_url":"https://github.com/kulshekhar/ts-jest/pull/25","id":183252768,"number":25,"title":"Support code coverage remapping","user":{"login":"kwonoj","id":1210596,"avatar_url":"https://avatars.githubusercontent.com/u/1210596?v=3","gravatar_id":"","url":"https://api.github.com/users/kwonoj","html_url":"https://github.com/kwonoj","followers_url":"https://api.github.com/users/kwonoj/followers","following_url":"https://api.github.com/users/kwonoj/following{/other_user}","gists_url":"https://api.github.com/users/kwonoj/gists{/gist_id}","starred_url":"https://api.github.com/users/kwonoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwonoj/subscriptions","organizations_url":"https://api.github.com/users/kwonoj/orgs","repos_url":"https://api.github.com/users/kwonoj/repos","events_url":"https://api.github.com/users/kwonoj/events{/privacy}","received_events_url":"https://api.github.com/users/kwonoj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-16T06:55:03Z","updated_at":"2016-10-16T07:23:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kulshekhar/ts-jest/pulls/25","html_url":"https://github.com/kulshekhar/ts-jest/pull/25","diff_url":"https://github.com/kulshekhar/ts-jest/pull/25.diff","patch_url":"https://github.com/kulshekhar/ts-jest/pull/25.patch"},"body":"This PR adds code coverage remapping after tests completes, using [testresultsprocessor](https://facebook.github.io/jest/docs/configuration.html#testresultsprocessor-string) .\r\n\r\n### How does it work?\r\n`jest` does not exposes hook to process code coverage after test completes, but provides hook for processing test results `testresultsprocessor`. This PR utilizes those to post process code coverage remapping. Unfortunately this hook is bit limited to post process coverage since this hook is being invoked after coverage processing is done, reason implementation has some workaround.\r\n\r\n### How to use\r\nas same as configuring preprosessor, setting result processor will enable coverage remapping. processor will honor most of coverage configuration.\r\n```js\r\n{\r\n  \"scriptPreprocessor\": \"<rootDir>/node_modules/ts-jest/preprocessor.js\",\r\n  \"testResultsProcessor\": \"<rootDir>/node_modules/ts-jest/coverageprocessor.js\",\r\n...\r\n```\r\n\r\ncloses https://github.com/kulshekhar/ts-jest/issues/19."},"comment":{"url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/comments/254031933","html_url":"https://github.com/kulshekhar/ts-jest/pull/25#issuecomment-254031933","issue_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/25","id":254031933,"user":{"login":"kwonoj","id":1210596,"avatar_url":"https://avatars.githubusercontent.com/u/1210596?v=3","gravatar_id":"","url":"https://api.github.com/users/kwonoj","html_url":"https://github.com/kwonoj","followers_url":"https://api.github.com/users/kwonoj/followers","following_url":"https://api.github.com/users/kwonoj/following{/other_user}","gists_url":"https://api.github.com/users/kwonoj/gists{/gist_id}","starred_url":"https://api.github.com/users/kwonoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwonoj/subscriptions","organizations_url":"https://api.github.com/users/kwonoj/orgs","repos_url":"https://api.github.com/users/kwonoj/repos","events_url":"https://api.github.com/users/kwonoj/events{/privacy}","received_events_url":"https://api.github.com/users/kwonoj/received_events","type":"User","site_admin":false},"created_at":"2016-10-16T07:23:26Z","updated_at":"2016-10-16T07:23:26Z","body":"> This PR seems to cause tests to fail. \r\n\r\n: yes, seems bit weirdly some module fails to import in test environment. I've amended implementation to avoid it. "}}
{"actor":{"display_login":"kwonoj"}}