{"action":"closed","number":7,"pull_request":{"url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls/7","id":182775045,"html_url":"https://github.com/sportheroes/bk-mocha-suite/pull/7","diff_url":"https://github.com/sportheroes/bk-mocha-suite/pull/7.diff","patch_url":"https://github.com/sportheroes/bk-mocha-suite/pull/7.patch","issue_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues/7","number":7,"state":"closed","locked":false,"title":"✅ [ADD] (method) Ability to match payload with sinon-matchers","user":{"login":"JoeTheFkingFrypan","id":2607260,"avatar_url":"https://avatars0.githubusercontent.com/u/2607260?v=4","gravatar_id":"","url":"https://api.github.com/users/JoeTheFkingFrypan","html_url":"https://github.com/JoeTheFkingFrypan","followers_url":"https://api.github.com/users/JoeTheFkingFrypan/followers","following_url":"https://api.github.com/users/JoeTheFkingFrypan/following{/other_user}","gists_url":"https://api.github.com/users/JoeTheFkingFrypan/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeTheFkingFrypan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeTheFkingFrypan/subscriptions","organizations_url":"https://api.github.com/users/JoeTheFkingFrypan/orgs","repos_url":"https://api.github.com/users/JoeTheFkingFrypan/repos","events_url":"https://api.github.com/users/JoeTheFkingFrypan/events{/privacy}","received_events_url":"https://api.github.com/users/JoeTheFkingFrypan/received_events","type":"User","site_admin":false},"body":"### Main changes ###\r\n\r\n- [X] Added new method called `assertMatchBetween ` allowing deep equality check with support of sinon matchers\r\n\r\n### Proof of concept ###\r\n\r\n```javascript\r\nSuite.only('Should emit event to clients according to their respective compatibilities', async () => {\r\n  const oldActivity = await getActivityFromDB('000000000000000000000001');\r\n  const activity = Object.assign({}, oldActivity, {\r\n    provider: 'Nike',\r\n    type: 'Cycling',\r\n  });\r\n\r\n  const activityId = activity._id;\r\n  const context = Suite.stubContext();\r\n\r\n  delete activity._id;\r\n\r\n  const newActivity = await editActivity.run({\r\n    activityId,\r\n    data: activity,\r\n  }, context);\r\n\r\n  Suite.assertMatchBetween(newActivity, {\r\n    _id: '000000000000000000000001',\r\n    uid: '100000000000000000000000',\r\n    activeTime: 0,\r\n    calories: 0,\r\n    climb: 14.1,\r\n    createdAt: new Date('2016-12-17T15:33:43.319+02:00'),\r\n    date: new Date('2016-12-17T14:33:24.000+02:00'),\r\n    deleted: false,\r\n    descent: 0.0319290557564429,\r\n    distance: 11211,\r\n    duration: 2725,\r\n    id: '000000001',\r\n    isDaily: false,\r\n    issues: [{\r\n      name: 'SAMPLE_ISSUE',\r\n    },\r\n    {\r\n      name: 'CONFLICT',\r\n      value: 'Activity is in conflict with another activity: 000000000000000000000002',\r\n    }],\r\n    isValid: false,\r\n    origin: VERSION,\r\n    points: 70,\r\n    provider: 'Nike',\r\n    source: 'push',\r\n    steps: 0,\r\n    timezone: 1,\r\n    updatedAt: sinon.match.Date,\r\n    type: 'Cycling',\r\n    __v: 0,\r\n  });\r\n\r\n  emitStub.should.not.have.been.called();\r\n});\r\n```\r\n","created_at":"2018-04-19T13:23:56Z","updated_at":"2018-04-19T13:24:45Z","closed_at":"2018-04-19T13:24:45Z","merged_at":"2018-04-19T13:24:45Z","merge_commit_sha":"92e85fa22e99c4e028a0234c5e3c86752a5b43f0","assignee":{"login":"JoeTheFkingFrypan","id":2607260,"avatar_url":"https://avatars0.githubusercontent.com/u/2607260?v=4","gravatar_id":"","url":"https://api.github.com/users/JoeTheFkingFrypan","html_url":"https://github.com/JoeTheFkingFrypan","followers_url":"https://api.github.com/users/JoeTheFkingFrypan/followers","following_url":"https://api.github.com/users/JoeTheFkingFrypan/following{/other_user}","gists_url":"https://api.github.com/users/JoeTheFkingFrypan/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeTheFkingFrypan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeTheFkingFrypan/subscriptions","organizations_url":"https://api.github.com/users/JoeTheFkingFrypan/orgs","repos_url":"https://api.github.com/users/JoeTheFkingFrypan/repos","events_url":"https://api.github.com/users/JoeTheFkingFrypan/events{/privacy}","received_events_url":"https://api.github.com/users/JoeTheFkingFrypan/received_events","type":"User","site_admin":false},"assignees":[{"login":"JoeTheFkingFrypan","id":2607260,"avatar_url":"https://avatars0.githubusercontent.com/u/2607260?v=4","gravatar_id":"","url":"https://api.github.com/users/JoeTheFkingFrypan","html_url":"https://github.com/JoeTheFkingFrypan","followers_url":"https://api.github.com/users/JoeTheFkingFrypan/followers","following_url":"https://api.github.com/users/JoeTheFkingFrypan/following{/other_user}","gists_url":"https://api.github.com/users/JoeTheFkingFrypan/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeTheFkingFrypan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeTheFkingFrypan/subscriptions","organizations_url":"https://api.github.com/users/JoeTheFkingFrypan/orgs","repos_url":"https://api.github.com/users/JoeTheFkingFrypan/repos","events_url":"https://api.github.com/users/JoeTheFkingFrypan/events{/privacy}","received_events_url":"https://api.github.com/users/JoeTheFkingFrypan/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"acostes","id":254666,"avatar_url":"https://avatars0.githubusercontent.com/u/254666?v=4","gravatar_id":"","url":"https://api.github.com/users/acostes","html_url":"https://github.com/acostes","followers_url":"https://api.github.com/users/acostes/followers","following_url":"https://api.github.com/users/acostes/following{/other_user}","gists_url":"https://api.github.com/users/acostes/gists{/gist_id}","starred_url":"https://api.github.com/users/acostes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acostes/subscriptions","organizations_url":"https://api.github.com/users/acostes/orgs","repos_url":"https://api.github.com/users/acostes/repos","events_url":"https://api.github.com/users/acostes/events{/privacy}","received_events_url":"https://api.github.com/users/acostes/received_events","type":"User","site_admin":false},{"login":"pvign","id":5763880,"avatar_url":"https://avatars3.githubusercontent.com/u/5763880?v=4","gravatar_id":"","url":"https://api.github.com/users/pvign","html_url":"https://github.com/pvign","followers_url":"https://api.github.com/users/pvign/followers","following_url":"https://api.github.com/users/pvign/following{/other_user}","gists_url":"https://api.github.com/users/pvign/gists{/gist_id}","starred_url":"https://api.github.com/users/pvign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvign/subscriptions","organizations_url":"https://api.github.com/users/pvign/orgs","repos_url":"https://api.github.com/users/pvign/repos","events_url":"https://api.github.com/users/pvign/events{/privacy}","received_events_url":"https://api.github.com/users/pvign/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":652048359,"url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/labels/Ready%20For%20Review","name":"Ready For Review","color":"0e8a16","default":false},{"id":859334602,"url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/labels/Size%20Small%20(%3C%20100%20lines)","name":"Size Small (< 100 lines)","color":"291b16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls/7/commits","review_comments_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls/7/comments","review_comment_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues/7/comments","statuses_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/statuses/7f1b9320c27ecc4978cca0c88a8e090f20c9c46c","head":{"label":"sportheroes:romain/feature/assertMatchBetween","ref":"romain/feature/assertMatchBetween","sha":"7f1b9320c27ecc4978cca0c88a8e090f20c9c46c","user":{"login":"sportheroes","id":8504607,"avatar_url":"https://avatars2.githubusercontent.com/u/8504607?v=4","gravatar_id":"","url":"https://api.github.com/users/sportheroes","html_url":"https://github.com/sportheroes","followers_url":"https://api.github.com/users/sportheroes/followers","following_url":"https://api.github.com/users/sportheroes/following{/other_user}","gists_url":"https://api.github.com/users/sportheroes/gists{/gist_id}","starred_url":"https://api.github.com/users/sportheroes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportheroes/subscriptions","organizations_url":"https://api.github.com/users/sportheroes/orgs","repos_url":"https://api.github.com/users/sportheroes/repos","events_url":"https://api.github.com/users/sportheroes/events{/privacy}","received_events_url":"https://api.github.com/users/sportheroes/received_events","type":"Organization","site_admin":false},"repo":{"id":97943843,"name":"bk-mocha-suite","full_name":"sportheroes/bk-mocha-suite","owner":{"login":"sportheroes","id":8504607,"avatar_url":"https://avatars2.githubusercontent.com/u/8504607?v=4","gravatar_id":"","url":"https://api.github.com/users/sportheroes","html_url":"https://github.com/sportheroes","followers_url":"https://api.github.com/users/sportheroes/followers","following_url":"https://api.github.com/users/sportheroes/following{/other_user}","gists_url":"https://api.github.com/users/sportheroes/gists{/gist_id}","starred_url":"https://api.github.com/users/sportheroes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportheroes/subscriptions","organizations_url":"https://api.github.com/users/sportheroes/orgs","repos_url":"https://api.github.com/users/sportheroes/repos","events_url":"https://api.github.com/users/sportheroes/events{/privacy}","received_events_url":"https://api.github.com/users/sportheroes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sportheroes/bk-mocha-suite","description":"Mocha Suit - the way to improve your tests.","fork":true,"url":"https://api.github.com/repos/sportheroes/bk-mocha-suite","forks_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/forks","keys_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/teams","hooks_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/hooks","issue_events_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues/events{/number}","events_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/events","assignees_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/assignees{/user}","branches_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/branches{/branch}","tags_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/tags","blobs_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/refs{/sha}","trees_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/statuses/{sha}","languages_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/languages","stargazers_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/stargazers","contributors_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/contributors","subscribers_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/subscribers","subscription_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/subscription","commits_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/commits{/sha}","git_commits_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/commits{/sha}","comments_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/comments{/number}","issue_comment_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues/comments{/number}","contents_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/contents/{+path}","compare_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/merges","archive_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/downloads","issues_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues{/number}","pulls_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls{/number}","milestones_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/milestones{/number}","notifications_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/labels{/name}","releases_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/releases{/id}","deployments_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/deployments","created_at":"2017-07-21T12:06:35Z","updated_at":"2018-03-19T12:31:24Z","pushed_at":"2018-04-19T13:24:45Z","git_url":"git://github.com/sportheroes/bk-mocha-suite.git","ssh_url":"git@github.com:sportheroes/bk-mocha-suite.git","clone_url":"https://github.com/sportheroes/bk-mocha-suite.git","svn_url":"https://github.com/sportheroes/bk-mocha-suite","homepage":"","size":167,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sportheroes:master","ref":"master","sha":"e8cb6dd83a536e5d6ade9a18e186cf88569a2d5d","user":{"login":"sportheroes","id":8504607,"avatar_url":"https://avatars2.githubusercontent.com/u/8504607?v=4","gravatar_id":"","url":"https://api.github.com/users/sportheroes","html_url":"https://github.com/sportheroes","followers_url":"https://api.github.com/users/sportheroes/followers","following_url":"https://api.github.com/users/sportheroes/following{/other_user}","gists_url":"https://api.github.com/users/sportheroes/gists{/gist_id}","starred_url":"https://api.github.com/users/sportheroes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportheroes/subscriptions","organizations_url":"https://api.github.com/users/sportheroes/orgs","repos_url":"https://api.github.com/users/sportheroes/repos","events_url":"https://api.github.com/users/sportheroes/events{/privacy}","received_events_url":"https://api.github.com/users/sportheroes/received_events","type":"Organization","site_admin":false},"repo":{"id":97943843,"name":"bk-mocha-suite","full_name":"sportheroes/bk-mocha-suite","owner":{"login":"sportheroes","id":8504607,"avatar_url":"https://avatars2.githubusercontent.com/u/8504607?v=4","gravatar_id":"","url":"https://api.github.com/users/sportheroes","html_url":"https://github.com/sportheroes","followers_url":"https://api.github.com/users/sportheroes/followers","following_url":"https://api.github.com/users/sportheroes/following{/other_user}","gists_url":"https://api.github.com/users/sportheroes/gists{/gist_id}","starred_url":"https://api.github.com/users/sportheroes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportheroes/subscriptions","organizations_url":"https://api.github.com/users/sportheroes/orgs","repos_url":"https://api.github.com/users/sportheroes/repos","events_url":"https://api.github.com/users/sportheroes/events{/privacy}","received_events_url":"https://api.github.com/users/sportheroes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sportheroes/bk-mocha-suite","description":"Mocha Suit - the way to improve your tests.","fork":true,"url":"https://api.github.com/repos/sportheroes/bk-mocha-suite","forks_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/forks","keys_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/teams","hooks_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/hooks","issue_events_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues/events{/number}","events_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/events","assignees_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/assignees{/user}","branches_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/branches{/branch}","tags_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/tags","blobs_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/refs{/sha}","trees_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/statuses/{sha}","languages_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/languages","stargazers_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/stargazers","contributors_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/contributors","subscribers_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/subscribers","subscription_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/subscription","commits_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/commits{/sha}","git_commits_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/git/commits{/sha}","comments_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/comments{/number}","issue_comment_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues/comments{/number}","contents_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/contents/{+path}","compare_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/merges","archive_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/downloads","issues_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues{/number}","pulls_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls{/number}","milestones_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/milestones{/number}","notifications_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/labels{/name}","releases_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/releases{/id}","deployments_url":"https://api.github.com/repos/sportheroes/bk-mocha-suite/deployments","created_at":"2017-07-21T12:06:35Z","updated_at":"2018-03-19T12:31:24Z","pushed_at":"2018-04-19T13:24:45Z","git_url":"git://github.com/sportheroes/bk-mocha-suite.git","ssh_url":"git@github.com:sportheroes/bk-mocha-suite.git","clone_url":"https://github.com/sportheroes/bk-mocha-suite.git","svn_url":"https://github.com/sportheroes/bk-mocha-suite","homepage":"","size":167,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls/7"},"html":{"href":"https://github.com/sportheroes/bk-mocha-suite/pull/7"},"issue":{"href":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues/7"},"comments":{"href":"https://api.github.com/repos/sportheroes/bk-mocha-suite/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sportheroes/bk-mocha-suite/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/sportheroes/bk-mocha-suite/statuses/7f1b9320c27ecc4978cca0c88a8e090f20c9c46c"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"stombre","id":5971954,"avatar_url":"https://avatars0.githubusercontent.com/u/5971954?v=4","gravatar_id":"","url":"https://api.github.com/users/stombre","html_url":"https://github.com/stombre","followers_url":"https://api.github.com/users/stombre/followers","following_url":"https://api.github.com/users/stombre/following{/other_user}","gists_url":"https://api.github.com/users/stombre/gists{/gist_id}","starred_url":"https://api.github.com/users/stombre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stombre/subscriptions","organizations_url":"https://api.github.com/users/stombre/orgs","repos_url":"https://api.github.com/users/stombre/repos","events_url":"https://api.github.com/users/stombre/events{/privacy}","received_events_url":"https://api.github.com/users/stombre/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":8,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"stombre"}}