{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/jest/pulls/comments/220236095","pull_request_review_id":158597411,"id":220236095,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDIzNjA5NQ==","diff_hunk":"@@ -221,14 +240,20 @@ describe('.toStrictEqual()', () => {\n \n   it('passes when comparing same type', () => {\n     expect({\n-      test: new TestClass(1, 2),\n-    }).toStrictEqual({test: new TestClass(1, 2)});\n+      test: new TestClassA(1, 2),\n+    }).toStrictEqual({test: new TestClassA(1, 2)});\n   });\n \n   it('does not pass for different types', () => {\n     expect({\n-      test: new TestClass(1, 2),\n-    }).not.toStrictEqual({test: {a: 1, b: 2}});\n+      test: new TestClassA(1, 2),\n+    }).not.toStrictEqual({test: new TestClassB(1, 2)});\n+  });\n+\n+  it('does not simply compare constructor names', () => {\n+    expect({\n+      test: new TestClassC(1, 2),\n+    }).not.toStrictEqual({test: new TestClassD(1, 2)});","path":"packages/expect/src/__tests__/matchers.test.js","position":55,"original_position":55,"commit_id":"ad7cfc748af9bbf8c449d43f7b9cb859a59df8f5","original_commit_id":"ad7cfc748af9bbf8c449d43f7b9cb859a59df8f5","user":{"login":"rickhanlonii","id":2440089,"node_id":"MDQ6VXNlcjI0NDAwODk=","avatar_url":"https://avatars0.githubusercontent.com/u/2440089?v=4","gravatar_id":"","url":"https://api.github.com/users/rickhanlonii","html_url":"https://github.com/rickhanlonii","followers_url":"https://api.github.com/users/rickhanlonii/followers","following_url":"https://api.github.com/users/rickhanlonii/following{/other_user}","gists_url":"https://api.github.com/users/rickhanlonii/gists{/gist_id}","starred_url":"https://api.github.com/users/rickhanlonii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickhanlonii/subscriptions","organizations_url":"https://api.github.com/users/rickhanlonii/orgs","repos_url":"https://api.github.com/users/rickhanlonii/repos","events_url":"https://api.github.com/users/rickhanlonii/events{/privacy}","received_events_url":"https://api.github.com/users/rickhanlonii/received_events","type":"User","site_admin":false},"body":"Ah yes, I see it now, thanks!\r\n\r\nMay be worth adding an expect like:\r\n\r\n```js\r\nexpect(c.constructor.name).toEqual(d.constructor.name);\r\n```","created_at":"2018-09-25T15:16:31Z","updated_at":"2018-09-25T15:16:31Z","html_url":"https://github.com/facebook/jest/pull/7005#discussion_r220236095","pull_request_url":"https://api.github.com/repos/facebook/jest/pulls/7005","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/facebook/jest/pulls/comments/220236095"},"html":{"href":"https://github.com/facebook/jest/pull/7005#discussion_r220236095"},"pull_request":{"href":"https://api.github.com/repos/facebook/jest/pulls/7005"}},"in_reply_to_id":220214618},"pull_request":{"url":"https://api.github.com/repos/facebook/jest/pulls/7005","id":216790399,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2NzkwMzk5","html_url":"https://github.com/facebook/jest/pull/7005","diff_url":"https://github.com/facebook/jest/pull/7005.diff","patch_url":"https://github.com/facebook/jest/pull/7005.patch","issue_url":"https://api.github.com/repos/facebook/jest/issues/7005","number":7005,"state":"open","locked":false,"title":"Check constructor equality in .toStrictEqual()","user":{"login":"ollelauribostrom","id":16004130,"node_id":"MDQ6VXNlcjE2MDA0MTMw","avatar_url":"https://avatars0.githubusercontent.com/u/16004130?v=4","gravatar_id":"","url":"https://api.github.com/users/ollelauribostrom","html_url":"https://github.com/ollelauribostrom","followers_url":"https://api.github.com/users/ollelauribostrom/followers","following_url":"https://api.github.com/users/ollelauribostrom/following{/other_user}","gists_url":"https://api.github.com/users/ollelauribostrom/gists{/gist_id}","starred_url":"https://api.github.com/users/ollelauribostrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollelauribostrom/subscriptions","organizations_url":"https://api.github.com/users/ollelauribostrom/orgs","repos_url":"https://api.github.com/users/ollelauribostrom/repos","events_url":"https://api.github.com/users/ollelauribostrom/events{/privacy}","received_events_url":"https://api.github.com/users/ollelauribostrom/received_events","type":"User","site_admin":false},"body":"Associated Issue: #6767 \r\n\r\n## Summary\r\nModified [typeEquality](https://github.com/facebook/jest/blob/master/packages/expect/src/utils.js#L215) to check for constructor equality and not just compare constructor names. This makes `.toStrictEqual()` no longer treat different classes with the same name as equal.\r\n\r\n## Test plan\r\n- Added a test case that verifies that `.toStrictEqual()` no longer treat different classes with the same name as equal. \r\n","created_at":"2018-09-19T22:03:46Z","updated_at":"2018-09-25T15:16:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c7448c231585d8a26c30675003020a5118c22d6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mjesun","id":829269,"node_id":"MDQ6VXNlcjgyOTI2OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/829269?v=4","gravatar_id":"","url":"https://api.github.com/users/mjesun","html_url":"https://github.com/mjesun","followers_url":"https://api.github.com/users/mjesun/followers","following_url":"https://api.github.com/users/mjesun/following{/other_user}","gists_url":"https://api.github.com/users/mjesun/gists{/gist_id}","starred_url":"https://api.github.com/users/mjesun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjesun/subscriptions","organizations_url":"https://api.github.com/users/mjesun/orgs","repos_url":"https://api.github.com/users/mjesun/repos","events_url":"https://api.github.com/users/mjesun/events{/privacy}","received_events_url":"https://api.github.com/users/mjesun/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":847426897,"node_id":"MDU6TGFiZWw4NDc0MjY4OTc=","url":"https://api.github.com/repos/facebook/jest/labels/cla%20signed","name":"cla signed","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/jest/pulls/7005/commits","review_comments_url":"https://api.github.com/repos/facebook/jest/pulls/7005/comments","review_comment_url":"https://api.github.com/repos/facebook/jest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/jest/issues/7005/comments","statuses_url":"https://api.github.com/repos/facebook/jest/statuses/ad7cfc748af9bbf8c449d43f7b9cb859a59df8f5","head":{"label":"ollelauribostrom:fix-6767","ref":"fix-6767","sha":"ad7cfc748af9bbf8c449d43f7b9cb859a59df8f5","user":{"login":"ollelauribostrom","id":16004130,"node_id":"MDQ6VXNlcjE2MDA0MTMw","avatar_url":"https://avatars0.githubusercontent.com/u/16004130?v=4","gravatar_id":"","url":"https://api.github.com/users/ollelauribostrom","html_url":"https://github.com/ollelauribostrom","followers_url":"https://api.github.com/users/ollelauribostrom/followers","following_url":"https://api.github.com/users/ollelauribostrom/following{/other_user}","gists_url":"https://api.github.com/users/ollelauribostrom/gists{/gist_id}","starred_url":"https://api.github.com/users/ollelauribostrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollelauribostrom/subscriptions","organizations_url":"https://api.github.com/users/ollelauribostrom/orgs","repos_url":"https://api.github.com/users/ollelauribostrom/repos","events_url":"https://api.github.com/users/ollelauribostrom/events{/privacy}","received_events_url":"https://api.github.com/users/ollelauribostrom/received_events","type":"User","site_admin":false},"repo":{"id":144464148,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ0NjQxNDg=","name":"jest","full_name":"ollelauribostrom/jest","private":false,"owner":{"login":"ollelauribostrom","id":16004130,"node_id":"MDQ6VXNlcjE2MDA0MTMw","avatar_url":"https://avatars0.githubusercontent.com/u/16004130?v=4","gravatar_id":"","url":"https://api.github.com/users/ollelauribostrom","html_url":"https://github.com/ollelauribostrom","followers_url":"https://api.github.com/users/ollelauribostrom/followers","following_url":"https://api.github.com/users/ollelauribostrom/following{/other_user}","gists_url":"https://api.github.com/users/ollelauribostrom/gists{/gist_id}","starred_url":"https://api.github.com/users/ollelauribostrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollelauribostrom/subscriptions","organizations_url":"https://api.github.com/users/ollelauribostrom/orgs","repos_url":"https://api.github.com/users/ollelauribostrom/repos","events_url":"https://api.github.com/users/ollelauribostrom/events{/privacy}","received_events_url":"https://api.github.com/users/ollelauribostrom/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ollelauribostrom/jest","description":"🃏 Delightful JavaScript Testing.","fork":true,"url":"https://api.github.com/repos/ollelauribostrom/jest","forks_url":"https://api.github.com/repos/ollelauribostrom/jest/forks","keys_url":"https://api.github.com/repos/ollelauribostrom/jest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ollelauribostrom/jest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ollelauribostrom/jest/teams","hooks_url":"https://api.github.com/repos/ollelauribostrom/jest/hooks","issue_events_url":"https://api.github.com/repos/ollelauribostrom/jest/issues/events{/number}","events_url":"https://api.github.com/repos/ollelauribostrom/jest/events","assignees_url":"https://api.github.com/repos/ollelauribostrom/jest/assignees{/user}","branches_url":"https://api.github.com/repos/ollelauribostrom/jest/branches{/branch}","tags_url":"https://api.github.com/repos/ollelauribostrom/jest/tags","blobs_url":"https://api.github.com/repos/ollelauribostrom/jest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ollelauribostrom/jest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ollelauribostrom/jest/git/refs{/sha}","trees_url":"https://api.github.com/repos/ollelauribostrom/jest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ollelauribostrom/jest/statuses/{sha}","languages_url":"https://api.github.com/repos/ollelauribostrom/jest/languages","stargazers_url":"https://api.github.com/repos/ollelauribostrom/jest/stargazers","contributors_url":"https://api.github.com/repos/ollelauribostrom/jest/contributors","subscribers_url":"https://api.github.com/repos/ollelauribostrom/jest/subscribers","subscription_url":"https://api.github.com/repos/ollelauribostrom/jest/subscription","commits_url":"https://api.github.com/repos/ollelauribostrom/jest/commits{/sha}","git_commits_url":"https://api.github.com/repos/ollelauribostrom/jest/git/commits{/sha}","comments_url":"https://api.github.com/repos/ollelauribostrom/jest/comments{/number}","issue_comment_url":"https://api.github.com/repos/ollelauribostrom/jest/issues/comments{/number}","contents_url":"https://api.github.com/repos/ollelauribostrom/jest/contents/{+path}","compare_url":"https://api.github.com/repos/ollelauribostrom/jest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ollelauribostrom/jest/merges","archive_url":"https://api.github.com/repos/ollelauribostrom/jest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ollelauribostrom/jest/downloads","issues_url":"https://api.github.com/repos/ollelauribostrom/jest/issues{/number}","pulls_url":"https://api.github.com/repos/ollelauribostrom/jest/pulls{/number}","milestones_url":"https://api.github.com/repos/ollelauribostrom/jest/milestones{/number}","notifications_url":"https://api.github.com/repos/ollelauribostrom/jest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ollelauribostrom/jest/labels{/name}","releases_url":"https://api.github.com/repos/ollelauribostrom/jest/releases{/id}","deployments_url":"https://api.github.com/repos/ollelauribostrom/jest/deployments","created_at":"2018-08-12T12:18:12Z","updated_at":"2018-08-12T12:18:18Z","pushed_at":"2018-09-24T19:08:21Z","git_url":"git://github.com/ollelauribostrom/jest.git","ssh_url":"git@github.com:ollelauribostrom/jest.git","clone_url":"https://github.com/ollelauribostrom/jest.git","svn_url":"https://github.com/ollelauribostrom/jest","homepage":"https://facebook.github.io/jest/","size":105996,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"0cd757b71cef7aec07c9532f7b64739cc8baeb1f","user":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":15062869,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA2Mjg2OQ==","name":"jest","full_name":"facebook/jest","private":false,"owner":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/facebook/jest","description":"🃏 Delightful JavaScript Testing.","fork":false,"url":"https://api.github.com/repos/facebook/jest","forks_url":"https://api.github.com/repos/facebook/jest/forks","keys_url":"https://api.github.com/repos/facebook/jest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/jest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/jest/teams","hooks_url":"https://api.github.com/repos/facebook/jest/hooks","issue_events_url":"https://api.github.com/repos/facebook/jest/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/jest/events","assignees_url":"https://api.github.com/repos/facebook/jest/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/jest/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/jest/tags","blobs_url":"https://api.github.com/repos/facebook/jest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/jest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/jest/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/jest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/jest/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/jest/languages","stargazers_url":"https://api.github.com/repos/facebook/jest/stargazers","contributors_url":"https://api.github.com/repos/facebook/jest/contributors","subscribers_url":"https://api.github.com/repos/facebook/jest/subscribers","subscription_url":"https://api.github.com/repos/facebook/jest/subscription","commits_url":"https://api.github.com/repos/facebook/jest/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/jest/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/jest/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/jest/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/jest/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/jest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/jest/merges","archive_url":"https://api.github.com/repos/facebook/jest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/jest/downloads","issues_url":"https://api.github.com/repos/facebook/jest/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/jest/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/jest/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/jest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/jest/labels{/name}","releases_url":"https://api.github.com/repos/facebook/jest/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/jest/deployments","created_at":"2013-12-10T00:18:04Z","updated_at":"2018-09-25T14:08:19Z","pushed_at":"2018-09-24T19:08:23Z","git_url":"git://github.com/facebook/jest.git","ssh_url":"git@github.com:facebook/jest.git","clone_url":"https://github.com/facebook/jest.git","svn_url":"https://github.com/facebook/jest","homepage":"https://facebook.github.io/jest/","size":115909,"stargazers_count":20578,"watchers_count":20578,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2696,"mirror_url":null,"archived":false,"open_issues_count":495,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2696,"open_issues":495,"watchers":20578,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/jest/pulls/7005"},"html":{"href":"https://github.com/facebook/jest/pull/7005"},"issue":{"href":"https://api.github.com/repos/facebook/jest/issues/7005"},"comments":{"href":"https://api.github.com/repos/facebook/jest/issues/7005/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/jest/pulls/7005/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/jest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/jest/pulls/7005/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/jest/statuses/ad7cfc748af9bbf8c449d43f7b9cb859a59df8f5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rickhanlonii"}}