{"action":"created","issue":{"url":"https://api.github.com/repos/joyent/node/issues/4523","labels_url":"https://api.github.com/repos/joyent/node/issues/4523/labels{/name}","comments_url":"https://api.github.com/repos/joyent/node/issues/4523/comments","events_url":"https://api.github.com/repos/joyent/node/issues/4523/events","html_url":"https://github.com/joyent/node/issues/4523","id":9711442,"number":4523,"title":"assert.deepEqual has bad test","user":{"login":"othiym23","id":418097,"avatar_url":"https://avatars.githubusercontent.com/u/418097?v=3","gravatar_id":"","url":"https://api.github.com/users/othiym23","html_url":"https://github.com/othiym23","followers_url":"https://api.github.com/users/othiym23/followers","following_url":"https://api.github.com/users/othiym23/following{/other_user}","gists_url":"https://api.github.com/users/othiym23/gists{/gist_id}","starred_url":"https://api.github.com/users/othiym23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/othiym23/subscriptions","organizations_url":"https://api.github.com/users/othiym23/orgs","repos_url":"https://api.github.com/users/othiym23/repos","events_url":"https://api.github.com/users/othiym23/events{/privacy}","received_events_url":"https://api.github.com/users/othiym23/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joyent/node/labels/assert","name":"assert","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2013-01-06T00:31:59Z","updated_at":"2015-03-04T01:53:09Z","closed_at":null,"body":"If you look at https://github.com/joyent/node/blob/master/lib/assert.js#L208-L209\r\n\r\n```javascript\r\n  // an identical 'prototype' property.\r\n  if (a.prototype !== b.prototype) return false;\r\n```\r\n\r\nis incorrect. `a` and `b` are instances, not constructor functions, and as such, will never have prototypes set directly on them. Similar deep equality tests do the following instead:\r\n\r\n```javascript\r\n  // a and b are on the same constructor chain\r\n  if (a.constructor !== b.constructor) return false;\r\n```\r\n\r\n`objEquiv` should probably be changed similarly, although a case could be made that this test could be junked, seeing as how this hasn't been noticed until now."},"comment":{"url":"https://api.github.com/repos/joyent/node/issues/comments/77082495","html_url":"https://github.com/joyent/node/issues/4523#issuecomment-77082495","issue_url":"https://api.github.com/repos/joyent/node/issues/4523","id":77082495,"user":{"login":"cjihrig","id":2512748,"avatar_url":"https://avatars.githubusercontent.com/u/2512748?v=3","gravatar_id":"","url":"https://api.github.com/users/cjihrig","html_url":"https://github.com/cjihrig","followers_url":"https://api.github.com/users/cjihrig/followers","following_url":"https://api.github.com/users/cjihrig/following{/other_user}","gists_url":"https://api.github.com/users/cjihrig/gists{/gist_id}","starred_url":"https://api.github.com/users/cjihrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjihrig/subscriptions","organizations_url":"https://api.github.com/users/cjihrig/orgs","repos_url":"https://api.github.com/users/cjihrig/repos","events_url":"https://api.github.com/users/cjihrig/events{/privacy}","received_events_url":"https://api.github.com/users/cjihrig/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T01:53:09Z","updated_at":"2015-03-04T01:53:09Z","body":"This is a shortcoming of `assert.deepEqual()`. It was fixed in io.js in https://github.com/iojs/io.js/commit/3f473ef141fdc7059928ebc4542b00e2f126ab07 by adding the `assert.deepStrictEqual()`."}}