{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/babel-plugin-react-transform/issues/16","labels_url":"https://api.github.com/repos/gaearon/babel-plugin-react-transform/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/babel-plugin-react-transform/issues/16/comments","events_url":"https://api.github.com/repos/gaearon/babel-plugin-react-transform/issues/16/events","html_url":"https://github.com/gaearon/babel-plugin-react-transform/issues/16","id":105609071,"number":16,"title":"Transform interferes with Istanbul code coverage","user":{"login":"wbecker","id":348044,"avatar_url":"https://avatars.githubusercontent.com/u/348044?v=3","gravatar_id":"","url":"https://api.github.com/users/wbecker","html_url":"https://github.com/wbecker","followers_url":"https://api.github.com/users/wbecker/followers","following_url":"https://api.github.com/users/wbecker/following{/other_user}","gists_url":"https://api.github.com/users/wbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/wbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbecker/subscriptions","organizations_url":"https://api.github.com/users/wbecker/orgs","repos_url":"https://api.github.com/users/wbecker/repos","events_url":"https://api.github.com/users/wbecker/events{/privacy}","received_events_url":"https://api.github.com/users/wbecker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-09T14:32:10Z","updated_at":"2015-09-09T14:38:47Z","closed_at":null,"body":"When a class has isComponentishClass pass on it, it is transformed, and that transform has a branch in it:\r\n```javascript\r\nvar Some_React_Class = (function (_React$Component) {\r\n  _inherits(Some_React_Class, _React$Component);\r\n\r\n  function Some_React_Class() {\r\n    _classCallCheck(this, _Some_React_Class);\r\n\r\n    _get(Object.getPrototypeOf(_Some_React_Class.prototype), \"constructor\", this).apply(this, arguments);\r\n  }\r\n\r\n  _createClass(Some_React_Class, [{\r\n    key: \"render\",\r\n    value: function render() {\r\n      return _react2[\"default\"].createElement(\r\n        \"div\"\r\n      );\r\n    }\r\n  }]);\r\n\r\n  var _Some_React_Class = Some_React_Class;\r\n\r\n//This is the branch:\r\n  Some_React_Class = _wrapComponent(\"_$Some_React_Class\")(Some_React_Class) || Some_React_Class;\r\n  return Some_React_Class;\r\n})(_react2[\"default\"].Component);\r\n\r\nexports[\"default\"] = (0, _reactRedux.connect)(select)(Some_React_Class);\r\n```\r\n\r\nI've done a diff between a class which has a render function and one that doesn't - the difference seems to be the || Some_React_Class 5 lines from the end there. \r\n\r\nI'm not sure how to trigger the other side of that OR, or to ignore it, so this stops me from getting 100% test coverage and makes me sad."},"comment":{"url":"https://api.github.com/repos/gaearon/babel-plugin-react-transform/issues/comments/138931036","html_url":"https://github.com/gaearon/babel-plugin-react-transform/issues/16#issuecomment-138931036","issue_url":"https://api.github.com/repos/gaearon/babel-plugin-react-transform/issues/16","id":138931036,"user":{"login":"wbecker","id":348044,"avatar_url":"https://avatars.githubusercontent.com/u/348044?v=3","gravatar_id":"","url":"https://api.github.com/users/wbecker","html_url":"https://github.com/wbecker","followers_url":"https://api.github.com/users/wbecker/followers","following_url":"https://api.github.com/users/wbecker/following{/other_user}","gists_url":"https://api.github.com/users/wbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/wbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbecker/subscriptions","organizations_url":"https://api.github.com/users/wbecker/orgs","repos_url":"https://api.github.com/users/wbecker/repos","events_url":"https://api.github.com/users/wbecker/events{/privacy}","received_events_url":"https://api.github.com/users/wbecker/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T14:38:47Z","updated_at":"2015-09-09T14:38:47Z","body":"Also - I am only assuming it comes from this project - it is the only one in my node modules that has `_wrapComponent` in it."}}