{"action":"created","issue":{"url":"https://api.github.com/repos/QubitProducts/react-test-tree/issues/34","labels_url":"https://api.github.com/repos/QubitProducts/react-test-tree/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/QubitProducts/react-test-tree/issues/34/comments","events_url":"https://api.github.com/repos/QubitProducts/react-test-tree/issues/34/events","html_url":"https://github.com/QubitProducts/react-test-tree/issues/34","id":98372890,"number":34,"title":"Ignoring Higher Order Components","user":{"login":"jhollingworth","id":151172,"avatar_url":"https://avatars.githubusercontent.com/u/151172?v=3","gravatar_id":"","url":"https://api.github.com/users/jhollingworth","html_url":"https://github.com/jhollingworth","followers_url":"https://api.github.com/users/jhollingworth/followers","following_url":"https://api.github.com/users/jhollingworth/following{/other_user}","gists_url":"https://api.github.com/users/jhollingworth/gists{/gist_id}","starred_url":"https://api.github.com/users/jhollingworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhollingworth/subscriptions","organizations_url":"https://api.github.com/users/jhollingworth/orgs","repos_url":"https://api.github.com/users/jhollingworth/repos","events_url":"https://api.github.com/users/jhollingworth/events{/privacy}","received_events_url":"https://api.github.com/users/jhollingworth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-31T11:33:47Z","updated_at":"2015-08-03T10:09:16Z","closed_at":null,"body":"Its become [common in the react world to use function composition to add additional to components](https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750), known as [higher order components](https://gist.github.com/sebmarkbage/ef0bf1f338a7182b6775). Unfortunately they mess with a components refs which makes testing with test-tree a pain.\r\n\r\nI'd like a way to tell test-tree that a component is a HOC which would mean test tree essentially skips the component. Things like stubbing would be automatically handled for you as well\r\n\r\n```js\r\nconst something = InnerComponent => class HigherOrderComponent extends React.Component {\r\n  render () {\r\n    return <InnerComponent ref='innerComponent' __highOrderComponent={true} {...this.props}/>\r\n  }\r\n}\r\n\r\n@something\r\nclass Foo extends React.Component {\r\n   render () {\r\n     return <div ref='bar'>Woo</div>\r\n   }\r\n}\r\n\r\nconst foo = tree(<Foo />)\r\n\r\nconsole.log(foo.bar.innerText)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/QubitProducts/react-test-tree/issues/comments/127183441","html_url":"https://github.com/QubitProducts/react-test-tree/issues/34#issuecomment-127183441","issue_url":"https://api.github.com/repos/QubitProducts/react-test-tree/issues/34","id":127183441,"user":{"login":"jhollingworth","id":151172,"avatar_url":"https://avatars.githubusercontent.com/u/151172?v=3","gravatar_id":"","url":"https://api.github.com/users/jhollingworth","html_url":"https://github.com/jhollingworth","followers_url":"https://api.github.com/users/jhollingworth/followers","following_url":"https://api.github.com/users/jhollingworth/following{/other_user}","gists_url":"https://api.github.com/users/jhollingworth/gists{/gist_id}","starred_url":"https://api.github.com/users/jhollingworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhollingworth/subscriptions","organizations_url":"https://api.github.com/users/jhollingworth/orgs","repos_url":"https://api.github.com/users/jhollingworth/repos","events_url":"https://api.github.com/users/jhollingworth/events{/privacy}","received_events_url":"https://api.github.com/users/jhollingworth/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T10:09:16Z","updated_at":"2015-08-03T10:09:16Z","body":"sure"}}