{"action":"opened","number":115,"pull_request":{"url":"https://api.github.com/repos/mjackson/expect/pulls/115","id":76089104,"html_url":"https://github.com/mjackson/expect/pull/115","diff_url":"https://github.com/mjackson/expect/pull/115.diff","patch_url":"https://github.com/mjackson/expect/pull/115.patch","issue_url":"https://api.github.com/repos/mjackson/expect/issues/115","number":115,"state":"open","locked":false,"title":"Bug report: The assertions does not differentiate between instances and values for primitives","user":{"login":"FagnerMartinsBrack","id":835857,"avatar_url":"https://avatars.githubusercontent.com/u/835857?v=3","gravatar_id":"","url":"https://api.github.com/users/FagnerMartinsBrack","html_url":"https://github.com/FagnerMartinsBrack","followers_url":"https://api.github.com/users/FagnerMartinsBrack/followers","following_url":"https://api.github.com/users/FagnerMartinsBrack/following{/other_user}","gists_url":"https://api.github.com/users/FagnerMartinsBrack/gists{/gist_id}","starred_url":"https://api.github.com/users/FagnerMartinsBrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FagnerMartinsBrack/subscriptions","organizations_url":"https://api.github.com/users/FagnerMartinsBrack/orgs","repos_url":"https://api.github.com/users/FagnerMartinsBrack/repos","events_url":"https://api.github.com/users/FagnerMartinsBrack/events{/privacy}","received_events_url":"https://api.github.com/users/FagnerMartinsBrack/received_events","type":"User","site_admin":false},"body":"There are cases where expectations on a spy to be called with the same argument of the enclosed function can lead to false positives.\r\n\r\nSee this link: https://medium.com/@fagnerbrack/mocking-can-lean-to-nondeterministic-tests-4ba8aef977a0\r\n\r\nThe solutions are:\r\n\r\n1. Use generative testing to leverage triangulation/statistics\r\n2. Not use mock at all\r\n3. Check for the reference instead of the values.\r\n\r\nThis proposal allows this package to enable the solution 3 by making sure that methods that check the arguments are always using strict equality instead of loose equality.\r\n\r\nThis way it is possible to differentiate objects from literals, otherwise, it is impossible to create an efficient and deterministic test assertion.","created_at":"2016-07-03T13:32:17Z","updated_at":"2016-07-03T13:32:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mjackson/expect/pulls/115/commits","review_comments_url":"https://api.github.com/repos/mjackson/expect/pulls/115/comments","review_comment_url":"https://api.github.com/repos/mjackson/expect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mjackson/expect/issues/115/comments","statuses_url":"https://api.github.com/repos/mjackson/expect/statuses/7bef5ddcb648a4ef33a214fc5d9c5bf768406d7b","head":{"label":"FagnerMartinsBrack:fix-false-positives","ref":"fix-false-positives","sha":"7bef5ddcb648a4ef33a214fc5d9c5bf768406d7b","user":{"login":"FagnerMartinsBrack","id":835857,"avatar_url":"https://avatars.githubusercontent.com/u/835857?v=3","gravatar_id":"","url":"https://api.github.com/users/FagnerMartinsBrack","html_url":"https://github.com/FagnerMartinsBrack","followers_url":"https://api.github.com/users/FagnerMartinsBrack/followers","following_url":"https://api.github.com/users/FagnerMartinsBrack/following{/other_user}","gists_url":"https://api.github.com/users/FagnerMartinsBrack/gists{/gist_id}","starred_url":"https://api.github.com/users/FagnerMartinsBrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FagnerMartinsBrack/subscriptions","organizations_url":"https://api.github.com/users/FagnerMartinsBrack/orgs","repos_url":"https://api.github.com/users/FagnerMartinsBrack/repos","events_url":"https://api.github.com/users/FagnerMartinsBrack/events{/privacy}","received_events_url":"https://api.github.com/users/FagnerMartinsBrack/received_events","type":"User","site_admin":false},"repo":{"id":62497674,"name":"expect","full_name":"FagnerMartinsBrack/expect","owner":{"login":"FagnerMartinsBrack","id":835857,"avatar_url":"https://avatars.githubusercontent.com/u/835857?v=3","gravatar_id":"","url":"https://api.github.com/users/FagnerMartinsBrack","html_url":"https://github.com/FagnerMartinsBrack","followers_url":"https://api.github.com/users/FagnerMartinsBrack/followers","following_url":"https://api.github.com/users/FagnerMartinsBrack/following{/other_user}","gists_url":"https://api.github.com/users/FagnerMartinsBrack/gists{/gist_id}","starred_url":"https://api.github.com/users/FagnerMartinsBrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FagnerMartinsBrack/subscriptions","organizations_url":"https://api.github.com/users/FagnerMartinsBrack/orgs","repos_url":"https://api.github.com/users/FagnerMartinsBrack/repos","events_url":"https://api.github.com/users/FagnerMartinsBrack/events{/privacy}","received_events_url":"https://api.github.com/users/FagnerMartinsBrack/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FagnerMartinsBrack/expect","description":"Write better assertions","fork":true,"url":"https://api.github.com/repos/FagnerMartinsBrack/expect","forks_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/forks","keys_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/teams","hooks_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/hooks","issue_events_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/issues/events{/number}","events_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/events","assignees_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/assignees{/user}","branches_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/branches{/branch}","tags_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/tags","blobs_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/git/refs{/sha}","trees_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/statuses/{sha}","languages_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/languages","stargazers_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/stargazers","contributors_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/contributors","subscribers_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/subscribers","subscription_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/subscription","commits_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/commits{/sha}","git_commits_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/git/commits{/sha}","comments_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/comments{/number}","issue_comment_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/issues/comments{/number}","contents_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/contents/{+path}","compare_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/merges","archive_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/downloads","issues_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/issues{/number}","pulls_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/pulls{/number}","milestones_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/milestones{/number}","notifications_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/labels{/name}","releases_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/releases{/id}","deployments_url":"https://api.github.com/repos/FagnerMartinsBrack/expect/deployments","created_at":"2016-07-03T13:25:40Z","updated_at":"2016-07-03T13:25:41Z","pushed_at":"2016-07-03T13:29:54Z","git_url":"git://github.com/FagnerMartinsBrack/expect.git","ssh_url":"git@github.com:FagnerMartinsBrack/expect.git","clone_url":"https://github.com/FagnerMartinsBrack/expect.git","svn_url":"https://github.com/FagnerMartinsBrack/expect","homepage":"","size":297,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mjackson:master","ref":"master","sha":"206f0940c5c039ea603cdcb15191c1bcaa273125","user":{"login":"mjackson","id":92839,"avatar_url":"https://avatars.githubusercontent.com/u/92839?v=3","gravatar_id":"","url":"https://api.github.com/users/mjackson","html_url":"https://github.com/mjackson","followers_url":"https://api.github.com/users/mjackson/followers","following_url":"https://api.github.com/users/mjackson/following{/other_user}","gists_url":"https://api.github.com/users/mjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjackson/subscriptions","organizations_url":"https://api.github.com/users/mjackson/orgs","repos_url":"https://api.github.com/users/mjackson/repos","events_url":"https://api.github.com/users/mjackson/events{/privacy}","received_events_url":"https://api.github.com/users/mjackson/received_events","type":"User","site_admin":false},"repo":{"id":17575045,"name":"expect","full_name":"mjackson/expect","owner":{"login":"mjackson","id":92839,"avatar_url":"https://avatars.githubusercontent.com/u/92839?v=3","gravatar_id":"","url":"https://api.github.com/users/mjackson","html_url":"https://github.com/mjackson","followers_url":"https://api.github.com/users/mjackson/followers","following_url":"https://api.github.com/users/mjackson/following{/other_user}","gists_url":"https://api.github.com/users/mjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjackson/subscriptions","organizations_url":"https://api.github.com/users/mjackson/orgs","repos_url":"https://api.github.com/users/mjackson/repos","events_url":"https://api.github.com/users/mjackson/events{/privacy}","received_events_url":"https://api.github.com/users/mjackson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mjackson/expect","description":"Write better assertions","fork":false,"url":"https://api.github.com/repos/mjackson/expect","forks_url":"https://api.github.com/repos/mjackson/expect/forks","keys_url":"https://api.github.com/repos/mjackson/expect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mjackson/expect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mjackson/expect/teams","hooks_url":"https://api.github.com/repos/mjackson/expect/hooks","issue_events_url":"https://api.github.com/repos/mjackson/expect/issues/events{/number}","events_url":"https://api.github.com/repos/mjackson/expect/events","assignees_url":"https://api.github.com/repos/mjackson/expect/assignees{/user}","branches_url":"https://api.github.com/repos/mjackson/expect/branches{/branch}","tags_url":"https://api.github.com/repos/mjackson/expect/tags","blobs_url":"https://api.github.com/repos/mjackson/expect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mjackson/expect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mjackson/expect/git/refs{/sha}","trees_url":"https://api.github.com/repos/mjackson/expect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mjackson/expect/statuses/{sha}","languages_url":"https://api.github.com/repos/mjackson/expect/languages","stargazers_url":"https://api.github.com/repos/mjackson/expect/stargazers","contributors_url":"https://api.github.com/repos/mjackson/expect/contributors","subscribers_url":"https://api.github.com/repos/mjackson/expect/subscribers","subscription_url":"https://api.github.com/repos/mjackson/expect/subscription","commits_url":"https://api.github.com/repos/mjackson/expect/commits{/sha}","git_commits_url":"https://api.github.com/repos/mjackson/expect/git/commits{/sha}","comments_url":"https://api.github.com/repos/mjackson/expect/comments{/number}","issue_comment_url":"https://api.github.com/repos/mjackson/expect/issues/comments{/number}","contents_url":"https://api.github.com/repos/mjackson/expect/contents/{+path}","compare_url":"https://api.github.com/repos/mjackson/expect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mjackson/expect/merges","archive_url":"https://api.github.com/repos/mjackson/expect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mjackson/expect/downloads","issues_url":"https://api.github.com/repos/mjackson/expect/issues{/number}","pulls_url":"https://api.github.com/repos/mjackson/expect/pulls{/number}","milestones_url":"https://api.github.com/repos/mjackson/expect/milestones{/number}","notifications_url":"https://api.github.com/repos/mjackson/expect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mjackson/expect/labels{/name}","releases_url":"https://api.github.com/repos/mjackson/expect/releases{/id}","deployments_url":"https://api.github.com/repos/mjackson/expect/deployments","created_at":"2014-03-09T22:14:21Z","updated_at":"2016-07-03T13:02:42Z","pushed_at":"2016-07-03T13:32:18Z","git_url":"git://github.com/mjackson/expect.git","ssh_url":"git@github.com:mjackson/expect.git","clone_url":"https://github.com/mjackson/expect.git","svn_url":"https://github.com/mjackson/expect","homepage":"","size":297,"stargazers_count":786,"watchers_count":786,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":8,"forks":50,"open_issues":8,"watchers":786,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mjackson/expect/pulls/115"},"html":{"href":"https://github.com/mjackson/expect/pull/115"},"issue":{"href":"https://api.github.com/repos/mjackson/expect/issues/115"},"comments":{"href":"https://api.github.com/repos/mjackson/expect/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/mjackson/expect/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/mjackson/expect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mjackson/expect/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/mjackson/expect/statuses/7bef5ddcb648a4ef33a214fc5d9c5bf768406d7b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":28,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"FagnerMartinsBrack"}}