{"action":"opened","issue":{"url":"https://api.github.com/repos/airbnb/enzyme/issues/648","repository_url":"https://api.github.com/repos/airbnb/enzyme","labels_url":"https://api.github.com/repos/airbnb/enzyme/issues/648/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/enzyme/issues/648/comments","events_url":"https://api.github.com/repos/airbnb/enzyme/issues/648/events","html_url":"https://github.com/airbnb/enzyme/issues/648","id":186788833,"number":648,"title":"Error if `hasClass` is called on the wrapper element","user":{"login":"jackfranklin","id":193238,"avatar_url":"https://avatars.githubusercontent.com/u/193238?v=3","gravatar_id":"","url":"https://api.github.com/users/jackfranklin","html_url":"https://github.com/jackfranklin","followers_url":"https://api.github.com/users/jackfranklin/followers","following_url":"https://api.github.com/users/jackfranklin/following{/other_user}","gists_url":"https://api.github.com/users/jackfranklin/gists{/gist_id}","starred_url":"https://api.github.com/users/jackfranklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackfranklin/subscriptions","organizations_url":"https://api.github.com/users/jackfranklin/orgs","repos_url":"https://api.github.com/users/jackfranklin/repos","events_url":"https://api.github.com/users/jackfranklin/events{/privacy}","received_events_url":"https://api.github.com/users/jackfranklin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-02T12:35:17Z","updated_at":"2016-11-02T12:35:17Z","closed_at":null,"body":"I just lost a few minutes because I had:\r\n\r\n```js\r\nwrapper = mount(...)\r\nexpect(wrapper.hasClass('foo')).toEqual(true)\r\n```\r\n\r\nWhere it of course should have been `wrapper.find('button').hasClass(...)`. Would it be possible to catch when someone is calling `hasClass` on the wrong thing and throw an error? I'm happy to do the PR if you think this is worthwhile. No worries if not!"}}
{"actor":{"display_login":"jackfranklin"}}