{"action":"created","comment":{"url":"https://api.github.com/repos/hueniverse/bananas/pulls/comments/77123797","id":77123797,"diff_hunk":"@@ -25,6 +25,13 @@ const expect = Code.expect;\n \n describe('Bananas', () => {\n \n+    const originalPost = Wreck.post;\n+    lab.afterEach((done) => {","path":"test/index.js","position":5,"original_position":5,"commit_id":"3a705e1439b7596a371dc2f3c4a738db3cf1d7c0","original_commit_id":"3a705e1439b7596a371dc2f3c4a738db3cf1d7c0","user":{"login":"iamdoron","id":3956042,"avatar_url":"https://avatars.githubusercontent.com/u/3956042?v=3","gravatar_id":"","url":"https://api.github.com/users/iamdoron","html_url":"https://github.com/iamdoron","followers_url":"https://api.github.com/users/iamdoron/followers","following_url":"https://api.github.com/users/iamdoron/following{/other_user}","gists_url":"https://api.github.com/users/iamdoron/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdoron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdoron/subscriptions","organizations_url":"https://api.github.com/users/iamdoron/orgs","repos_url":"https://api.github.com/users/iamdoron/repos","events_url":"https://api.github.com/users/iamdoron/events{/privacy}","received_events_url":"https://api.github.com/users/iamdoron/received_events","type":"User","site_admin":false},"body":"why? \r\n\r\nThere was a real issue here - some of the tests were returning `Wreck.post` to its original form before the tests were done (causing real network requests to loggly api), so I thought it's a good candidate for afterEach - otherwise you have to write it down every time you put done.\r\n\r\nUsually, I use afterEach when I have 'fake' tests. That way I can ensure whatever the test did, It got cleaned. The afterEach here is 'unobtrusive' - no harm done if you run it multiple times, it's just stating the fact `Wreck.post` returns to its original form.\r\n\r\nI guess the `afterEach` can cause some weird feeling of magic, because you don't see what's going on directly on the test you write","created_at":"2016-09-01T07:07:51Z","updated_at":"2016-09-01T07:07:51Z","html_url":"https://github.com/hueniverse/bananas/pull/14#discussion_r77123797","pull_request_url":"https://api.github.com/repos/hueniverse/bananas/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/hueniverse/bananas/pulls/comments/77123797"},"html":{"href":"https://github.com/hueniverse/bananas/pull/14#discussion_r77123797"},"pull_request":{"href":"https://api.github.com/repos/hueniverse/bananas/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/hueniverse/bananas/pulls/14","id":82351580,"html_url":"https://github.com/hueniverse/bananas/pull/14","diff_url":"https://github.com/hueniverse/bananas/pull/14.diff","patch_url":"https://github.com/hueniverse/bananas/pull/14.patch","issue_url":"https://api.github.com/repos/hueniverse/bananas/issues/14","number":14,"state":"open","locked":false,"title":"Make the tests tighter","user":{"login":"iamdoron","id":3956042,"avatar_url":"https://avatars.githubusercontent.com/u/3956042?v=3","gravatar_id":"","url":"https://api.github.com/users/iamdoron","html_url":"https://github.com/iamdoron","followers_url":"https://api.github.com/users/iamdoron/followers","following_url":"https://api.github.com/users/iamdoron/following{/other_user}","gists_url":"https://api.github.com/users/iamdoron/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdoron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdoron/subscriptions","organizations_url":"https://api.github.com/users/iamdoron/orgs","repos_url":"https://api.github.com/users/iamdoron/repos","events_url":"https://api.github.com/users/iamdoron/events{/privacy}","received_events_url":"https://api.github.com/users/iamdoron/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nI was going over the tests to see how to use the module and I found some untested areas. \r\nThere were also actual calls to loggly API during the tests, because when the server stops a log event is emitted - I guessed it wasn't intentional, so I moved some stuff to the `afterEach` function.","created_at":"2016-08-23T12:00:51Z","updated_at":"2016-09-01T07:07:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26baac06e8d3499ec9fef38b9a411d23fedf78b9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/hueniverse/bananas/pulls/14/commits","review_comments_url":"https://api.github.com/repos/hueniverse/bananas/pulls/14/comments","review_comment_url":"https://api.github.com/repos/hueniverse/bananas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hueniverse/bananas/issues/14/comments","statuses_url":"https://api.github.com/repos/hueniverse/bananas/statuses/3a705e1439b7596a371dc2f3c4a738db3cf1d7c0","head":{"label":"iamdoron:master","ref":"master","sha":"3a705e1439b7596a371dc2f3c4a738db3cf1d7c0","user":{"login":"iamdoron","id":3956042,"avatar_url":"https://avatars.githubusercontent.com/u/3956042?v=3","gravatar_id":"","url":"https://api.github.com/users/iamdoron","html_url":"https://github.com/iamdoron","followers_url":"https://api.github.com/users/iamdoron/followers","following_url":"https://api.github.com/users/iamdoron/following{/other_user}","gists_url":"https://api.github.com/users/iamdoron/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdoron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdoron/subscriptions","organizations_url":"https://api.github.com/users/iamdoron/orgs","repos_url":"https://api.github.com/users/iamdoron/repos","events_url":"https://api.github.com/users/iamdoron/events{/privacy}","received_events_url":"https://api.github.com/users/iamdoron/received_events","type":"User","site_admin":false},"repo":{"id":66358801,"name":"bananas","full_name":"iamdoron/bananas","owner":{"login":"iamdoron","id":3956042,"avatar_url":"https://avatars.githubusercontent.com/u/3956042?v=3","gravatar_id":"","url":"https://api.github.com/users/iamdoron","html_url":"https://github.com/iamdoron","followers_url":"https://api.github.com/users/iamdoron/followers","following_url":"https://api.github.com/users/iamdoron/following{/other_user}","gists_url":"https://api.github.com/users/iamdoron/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdoron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdoron/subscriptions","organizations_url":"https://api.github.com/users/iamdoron/orgs","repos_url":"https://api.github.com/users/iamdoron/repos","events_url":"https://api.github.com/users/iamdoron/events{/privacy}","received_events_url":"https://api.github.com/users/iamdoron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iamdoron/bananas","description":"Minimal Loggly hapi plugin","fork":true,"url":"https://api.github.com/repos/iamdoron/bananas","forks_url":"https://api.github.com/repos/iamdoron/bananas/forks","keys_url":"https://api.github.com/repos/iamdoron/bananas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamdoron/bananas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamdoron/bananas/teams","hooks_url":"https://api.github.com/repos/iamdoron/bananas/hooks","issue_events_url":"https://api.github.com/repos/iamdoron/bananas/issues/events{/number}","events_url":"https://api.github.com/repos/iamdoron/bananas/events","assignees_url":"https://api.github.com/repos/iamdoron/bananas/assignees{/user}","branches_url":"https://api.github.com/repos/iamdoron/bananas/branches{/branch}","tags_url":"https://api.github.com/repos/iamdoron/bananas/tags","blobs_url":"https://api.github.com/repos/iamdoron/bananas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamdoron/bananas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamdoron/bananas/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamdoron/bananas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamdoron/bananas/statuses/{sha}","languages_url":"https://api.github.com/repos/iamdoron/bananas/languages","stargazers_url":"https://api.github.com/repos/iamdoron/bananas/stargazers","contributors_url":"https://api.github.com/repos/iamdoron/bananas/contributors","subscribers_url":"https://api.github.com/repos/iamdoron/bananas/subscribers","subscription_url":"https://api.github.com/repos/iamdoron/bananas/subscription","commits_url":"https://api.github.com/repos/iamdoron/bananas/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamdoron/bananas/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamdoron/bananas/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamdoron/bananas/issues/comments{/number}","contents_url":"https://api.github.com/repos/iamdoron/bananas/contents/{+path}","compare_url":"https://api.github.com/repos/iamdoron/bananas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamdoron/bananas/merges","archive_url":"https://api.github.com/repos/iamdoron/bananas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamdoron/bananas/downloads","issues_url":"https://api.github.com/repos/iamdoron/bananas/issues{/number}","pulls_url":"https://api.github.com/repos/iamdoron/bananas/pulls{/number}","milestones_url":"https://api.github.com/repos/iamdoron/bananas/milestones{/number}","notifications_url":"https://api.github.com/repos/iamdoron/bananas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamdoron/bananas/labels{/name}","releases_url":"https://api.github.com/repos/iamdoron/bananas/releases{/id}","deployments_url":"https://api.github.com/repos/iamdoron/bananas/deployments","created_at":"2016-08-23T10:51:56Z","updated_at":"2016-08-23T10:51:57Z","pushed_at":"2016-08-24T11:51:53Z","git_url":"git://github.com/iamdoron/bananas.git","ssh_url":"git@github.com:iamdoron/bananas.git","clone_url":"https://github.com/iamdoron/bananas.git","svn_url":"https://github.com/iamdoron/bananas","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"hueniverse:master","ref":"master","sha":"9632f58a79264c8ac4590bcc8c2c13bb60f3c20c","user":{"login":"hueniverse","id":56631,"avatar_url":"https://avatars.githubusercontent.com/u/56631?v=3","gravatar_id":"","url":"https://api.github.com/users/hueniverse","html_url":"https://github.com/hueniverse","followers_url":"https://api.github.com/users/hueniverse/followers","following_url":"https://api.github.com/users/hueniverse/following{/other_user}","gists_url":"https://api.github.com/users/hueniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/hueniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hueniverse/subscriptions","organizations_url":"https://api.github.com/users/hueniverse/orgs","repos_url":"https://api.github.com/users/hueniverse/repos","events_url":"https://api.github.com/users/hueniverse/events{/privacy}","received_events_url":"https://api.github.com/users/hueniverse/received_events","type":"User","site_admin":false},"repo":{"id":50767516,"name":"bananas","full_name":"hueniverse/bananas","owner":{"login":"hueniverse","id":56631,"avatar_url":"https://avatars.githubusercontent.com/u/56631?v=3","gravatar_id":"","url":"https://api.github.com/users/hueniverse","html_url":"https://github.com/hueniverse","followers_url":"https://api.github.com/users/hueniverse/followers","following_url":"https://api.github.com/users/hueniverse/following{/other_user}","gists_url":"https://api.github.com/users/hueniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/hueniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hueniverse/subscriptions","organizations_url":"https://api.github.com/users/hueniverse/orgs","repos_url":"https://api.github.com/users/hueniverse/repos","events_url":"https://api.github.com/users/hueniverse/events{/privacy}","received_events_url":"https://api.github.com/users/hueniverse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hueniverse/bananas","description":"Minimal Loggly hapi plugin","fork":false,"url":"https://api.github.com/repos/hueniverse/bananas","forks_url":"https://api.github.com/repos/hueniverse/bananas/forks","keys_url":"https://api.github.com/repos/hueniverse/bananas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hueniverse/bananas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hueniverse/bananas/teams","hooks_url":"https://api.github.com/repos/hueniverse/bananas/hooks","issue_events_url":"https://api.github.com/repos/hueniverse/bananas/issues/events{/number}","events_url":"https://api.github.com/repos/hueniverse/bananas/events","assignees_url":"https://api.github.com/repos/hueniverse/bananas/assignees{/user}","branches_url":"https://api.github.com/repos/hueniverse/bananas/branches{/branch}","tags_url":"https://api.github.com/repos/hueniverse/bananas/tags","blobs_url":"https://api.github.com/repos/hueniverse/bananas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hueniverse/bananas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hueniverse/bananas/git/refs{/sha}","trees_url":"https://api.github.com/repos/hueniverse/bananas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hueniverse/bananas/statuses/{sha}","languages_url":"https://api.github.com/repos/hueniverse/bananas/languages","stargazers_url":"https://api.github.com/repos/hueniverse/bananas/stargazers","contributors_url":"https://api.github.com/repos/hueniverse/bananas/contributors","subscribers_url":"https://api.github.com/repos/hueniverse/bananas/subscribers","subscription_url":"https://api.github.com/repos/hueniverse/bananas/subscription","commits_url":"https://api.github.com/repos/hueniverse/bananas/commits{/sha}","git_commits_url":"https://api.github.com/repos/hueniverse/bananas/git/commits{/sha}","comments_url":"https://api.github.com/repos/hueniverse/bananas/comments{/number}","issue_comment_url":"https://api.github.com/repos/hueniverse/bananas/issues/comments{/number}","contents_url":"https://api.github.com/repos/hueniverse/bananas/contents/{+path}","compare_url":"https://api.github.com/repos/hueniverse/bananas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hueniverse/bananas/merges","archive_url":"https://api.github.com/repos/hueniverse/bananas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hueniverse/bananas/downloads","issues_url":"https://api.github.com/repos/hueniverse/bananas/issues{/number}","pulls_url":"https://api.github.com/repos/hueniverse/bananas/pulls{/number}","milestones_url":"https://api.github.com/repos/hueniverse/bananas/milestones{/number}","notifications_url":"https://api.github.com/repos/hueniverse/bananas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hueniverse/bananas/labels{/name}","releases_url":"https://api.github.com/repos/hueniverse/bananas/releases{/id}","deployments_url":"https://api.github.com/repos/hueniverse/bananas/deployments","created_at":"2016-01-31T09:45:27Z","updated_at":"2016-02-02T22:28:31Z","pushed_at":"2016-09-01T00:36:45Z","git_url":"git://github.com/hueniverse/bananas.git","ssh_url":"git@github.com:hueniverse/bananas.git","clone_url":"https://github.com/hueniverse/bananas.git","svn_url":"https://github.com/hueniverse/bananas","homepage":null,"size":32,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hueniverse/bananas/pulls/14"},"html":{"href":"https://github.com/hueniverse/bananas/pull/14"},"issue":{"href":"https://api.github.com/repos/hueniverse/bananas/issues/14"},"comments":{"href":"https://api.github.com/repos/hueniverse/bananas/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/hueniverse/bananas/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/hueniverse/bananas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hueniverse/bananas/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/hueniverse/bananas/statuses/3a705e1439b7596a371dc2f3c4a738db3cf1d7c0"}}}}
{"actor":{"display_login":"iamdoron"}}