{"action":"opened","issue":{"url":"https://api.github.com/repos/blainekasten/jasmine-enzyme/issues/29","repository_url":"https://api.github.com/repos/blainekasten/jasmine-enzyme","labels_url":"https://api.github.com/repos/blainekasten/jasmine-enzyme/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/blainekasten/jasmine-enzyme/issues/29/comments","events_url":"https://api.github.com/repos/blainekasten/jasmine-enzyme/issues/29/events","html_url":"https://github.com/blainekasten/jasmine-enzyme/issues/29","id":158958139,"number":29,"title":"Question: Avoid requiring enzyme for `toContainReact` matcher","user":{"login":"whawker","id":2003804,"avatar_url":"https://avatars.githubusercontent.com/u/2003804?v=3","gravatar_id":"","url":"https://api.github.com/users/whawker","html_url":"https://github.com/whawker","followers_url":"https://api.github.com/users/whawker/followers","following_url":"https://api.github.com/users/whawker/following{/other_user}","gists_url":"https://api.github.com/users/whawker/gists{/gist_id}","starred_url":"https://api.github.com/users/whawker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whawker/subscriptions","organizations_url":"https://api.github.com/users/whawker/orgs","repos_url":"https://api.github.com/users/whawker/repos","events_url":"https://api.github.com/users/whawker/events{/privacy}","received_events_url":"https://api.github.com/users/whawker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-07T15:48:07Z","updated_at":"2016-06-07T15:48:07Z","closed_at":null,"body":"Hi,\r\n\r\nI've been trying to create a Karma plugin wrapper for this project, however I've hit a road block as the `toContainReact` [matcher requires Enzyme](https://github.com/blainekasten/jasmine-enzyme/blob/master/src/assertions/toContainReact.js#L9).\r\n\r\nI've been playing around with the matcher, and found an alternative, but hacky solution to avoid the import.\r\n\r\nUsing\r\n```js\r\nconst wrappedInstance = Object.getPrototypeOf(enzymeWrapper).wrap(reactInstance);\r\n```\r\nInstead of\r\n```js\r\nconst wrappedInstance = shallow(reactInstance);\r\n```\r\n\r\nThis uses the [wrap method from ReactWrapper](https://github.com/airbnb/enzyme/blob/master/src/ReactWrapper.js#L855), but there may be hidden complications with the `this.root`?\r\n\r\nIs there any way we can render the error message without importing Enzyme?"}}
{"actor":{"display_login":"whawker"}}