{"action":"created","issue":{"url":"https://api.github.com/repos/PsychoLlama/expect-enzyme/issues/19","repository_url":"https://api.github.com/repos/PsychoLlama/expect-enzyme","labels_url":"https://api.github.com/repos/PsychoLlama/expect-enzyme/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/PsychoLlama/expect-enzyme/issues/19/comments","events_url":"https://api.github.com/repos/PsychoLlama/expect-enzyme/issues/19/events","html_url":"https://github.com/PsychoLlama/expect-enzyme/issues/19","id":250952502,"number":19,"title":"Allow Comparison of Object Props","user":{"login":"dglsparsons","id":8166969,"avatar_url":"https://avatars2.githubusercontent.com/u/8166969?v=4","gravatar_id":"","url":"https://api.github.com/users/dglsparsons","html_url":"https://github.com/dglsparsons","followers_url":"https://api.github.com/users/dglsparsons/followers","following_url":"https://api.github.com/users/dglsparsons/following{/other_user}","gists_url":"https://api.github.com/users/dglsparsons/gists{/gist_id}","starred_url":"https://api.github.com/users/dglsparsons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dglsparsons/subscriptions","organizations_url":"https://api.github.com/users/dglsparsons/orgs","repos_url":"https://api.github.com/users/dglsparsons/repos","events_url":"https://api.github.com/users/dglsparsons/events{/privacy}","received_events_url":"https://api.github.com/users/dglsparsons/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-17T13:56:07Z","updated_at":"2017-08-19T01:12:55Z","closed_at":null,"body":"Current behaviour of `toHaveProp` performs object comparison (i.e. `===`). This is tricky when you are comparing against a different but equivalent object. \r\n\r\ne.g. \r\n```javascript\r\nlet something = shallow(<Something value={{\"one\": 1}} />);\r\nexpect(something).toHaveProp(\"value\", { \"one\": 1}); // will fail because they are different object instances\r\n```\r\nCurrent workaround is to do \r\n```javascript\r\nlet something = shallow(<Something value={{\"one\": 1}} />);\r\nexpect(something.prop(\"value\")).toEqual({ \"one\": 1}); // will pass as the values are equivalent\r\n```\r\nWhich feels overly en-cumbersome. "},"comment":{"url":"https://api.github.com/repos/PsychoLlama/expect-enzyme/issues/comments/323490729","html_url":"https://github.com/PsychoLlama/expect-enzyme/issues/19#issuecomment-323490729","issue_url":"https://api.github.com/repos/PsychoLlama/expect-enzyme/issues/19","id":323490729,"user":{"login":"PsychoLlama","id":10053423,"avatar_url":"https://avatars3.githubusercontent.com/u/10053423?v=4","gravatar_id":"","url":"https://api.github.com/users/PsychoLlama","html_url":"https://github.com/PsychoLlama","followers_url":"https://api.github.com/users/PsychoLlama/followers","following_url":"https://api.github.com/users/PsychoLlama/following{/other_user}","gists_url":"https://api.github.com/users/PsychoLlama/gists{/gist_id}","starred_url":"https://api.github.com/users/PsychoLlama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PsychoLlama/subscriptions","organizations_url":"https://api.github.com/users/PsychoLlama/orgs","repos_url":"https://api.github.com/users/PsychoLlama/repos","events_url":"https://api.github.com/users/PsychoLlama/events{/privacy}","received_events_url":"https://api.github.com/users/PsychoLlama/received_events","type":"User","site_admin":false},"created_at":"2017-08-19T01:12:55Z","updated_at":"2017-08-19T01:12:55Z","body":"You're right! That was an oversight on my part. Adding it _should_ be backwards compatible (same reference always equals itself)."}}
{"actor":{"display_login":"PsychoLlama"}}