{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/enzyme/issues/662","repository_url":"https://api.github.com/repos/airbnb/enzyme","labels_url":"https://api.github.com/repos/airbnb/enzyme/issues/662/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/enzyme/issues/662/comments","events_url":"https://api.github.com/repos/airbnb/enzyme/issues/662/events","html_url":"https://github.com/airbnb/enzyme/pull/662","id":187553699,"number":662,"title":"Skip null or undefined props when comparing nodes","user":{"login":"vdemedes","id":697676,"avatar_url":"https://avatars.githubusercontent.com/u/697676?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemedes","html_url":"https://github.com/vdemedes","followers_url":"https://api.github.com/users/vdemedes/followers","following_url":"https://api.github.com/users/vdemedes/following{/other_user}","gists_url":"https://api.github.com/users/vdemedes/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemedes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemedes/subscriptions","organizations_url":"https://api.github.com/users/vdemedes/orgs","repos_url":"https://api.github.com/users/vdemedes/repos","events_url":"https://api.github.com/users/vdemedes/events{/privacy}","received_events_url":"https://api.github.com/users/vdemedes/received_events","type":"User","site_admin":false},"labels":[{"id":285505513,"url":"https://api.github.com/repos/airbnb/enzyme/labels/Mount","name":"Mount","color":"5319e7","default":false},{"id":320570650,"url":"https://api.github.com/repos/airbnb/enzyme/labels/PATCH","name":"PATCH","color":"bfe5bf","default":false},{"id":285505441,"url":"https://api.github.com/repos/airbnb/enzyme/labels/Shallow","name":"Shallow","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-11-06T10:35:25Z","updated_at":"2016-11-07T15:22:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/airbnb/enzyme/pulls/662","html_url":"https://github.com/airbnb/enzyme/pull/662","diff_url":"https://github.com/airbnb/enzyme/pull/662.diff","patch_url":"https://github.com/airbnb/enzyme/pull/662.patch"},"body":"Fixes #656.\r\n\r\nThis PR ensures `null` and `undefined` props are skipped when comparing nodes:\r\n\r\n```js\r\nexpect(nodeEqual(\r\n   <div className={null} id={undefined} />,\r\n   <div />\r\n)).to.equal(true);\r\n```\r\n\r\nA helper function `cleanProps` removes all `null` and `undefined` props. I wanted to do that in `propsOfNode()`, but there are multiple `return` statements, which would result in a lot of repetition.\r\n\r\nLet me know if this PR needs modification or anything else ;)"},"comment":{"url":"https://api.github.com/repos/airbnb/enzyme/issues/comments/258864660","html_url":"https://github.com/airbnb/enzyme/pull/662#issuecomment-258864660","issue_url":"https://api.github.com/repos/airbnb/enzyme/issues/662","id":258864660,"user":{"login":"vdemedes","id":697676,"avatar_url":"https://avatars.githubusercontent.com/u/697676?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemedes","html_url":"https://github.com/vdemedes","followers_url":"https://api.github.com/users/vdemedes/followers","following_url":"https://api.github.com/users/vdemedes/following{/other_user}","gists_url":"https://api.github.com/users/vdemedes/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemedes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemedes/subscriptions","organizations_url":"https://api.github.com/users/vdemedes/orgs","repos_url":"https://api.github.com/users/vdemedes/repos","events_url":"https://api.github.com/users/vdemedes/events{/privacy}","received_events_url":"https://api.github.com/users/vdemedes/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T15:22:41Z","updated_at":"2016-11-07T15:22:41Z","body":"Glad we agree, I'll update the PR!"}}
{"actor":{"display_login":"vdemedes"}}