{"action":"created","comment":{"url":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/comments/34647473","id":34647473,"diff_hunk":"@@ -59,7 +59,7 @@ module.exports = function(fn) {\n \n     res.end = function(chunk, encoding, cb) {\n       debug('end called');\n-      var args = Array.prototype.slice.call(arguments, 1);\n+      var args = Array.prototype.slice.call(arguments);","path":"index.js","position":5,"original_position":5,"commit_id":"969cc19f067bccdf8e906bc4720f65a00b480eaa","original_commit_id":"969cc19f067bccdf8e906bc4720f65a00b480eaa","user":{"login":"flockonus","id":165553,"avatar_url":"https://avatars.githubusercontent.com/u/165553?v=3","gravatar_id":"","url":"https://api.github.com/users/flockonus","html_url":"https://github.com/flockonus","followers_url":"https://api.github.com/users/flockonus/followers","following_url":"https://api.github.com/users/flockonus/following{/other_user}","gists_url":"https://api.github.com/users/flockonus/gists{/gist_id}","starred_url":"https://api.github.com/users/flockonus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flockonus/subscriptions","organizations_url":"https://api.github.com/users/flockonus/orgs","repos_url":"https://api.github.com/users/flockonus/repos","events_url":"https://api.github.com/users/flockonus/events{/privacy}","received_events_url":"https://api.github.com/users/flockonus/received_events","type":"User","site_admin":false},"body":"strange we didn't have a case to catch see this error when no intercept method was provided?","created_at":"2015-07-15T05:37:38Z","updated_at":"2015-07-15T05:37:38Z","html_url":"https://github.com/axiomzen/express-interceptor/pull/24#discussion_r34647473","pull_request_url":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/comments/34647473"},"html":{"href":"https://github.com/axiomzen/express-interceptor/pull/24#discussion_r34647473"},"pull_request":{"href":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/24","id":36295420,"html_url":"https://github.com/axiomzen/express-interceptor/pull/24","diff_url":"https://github.com/axiomzen/express-interceptor/pull/24.diff","patch_url":"https://github.com/axiomzen/express-interceptor/pull/24.patch","issue_url":"https://api.github.com/repos/axiomzen/express-interceptor/issues/24","number":24,"state":"open","locked":false,"title":"rewrite tests with unexpected express","user":{"login":"gustavnikolaj","id":1371503,"avatar_url":"https://avatars.githubusercontent.com/u/1371503?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavnikolaj","html_url":"https://github.com/gustavnikolaj","followers_url":"https://api.github.com/users/gustavnikolaj/followers","following_url":"https://api.github.com/users/gustavnikolaj/following{/other_user}","gists_url":"https://api.github.com/users/gustavnikolaj/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavnikolaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavnikolaj/subscriptions","organizations_url":"https://api.github.com/users/gustavnikolaj/orgs","repos_url":"https://api.github.com/users/gustavnikolaj/repos","events_url":"https://api.github.com/users/gustavnikolaj/events{/privacy}","received_events_url":"https://api.github.com/users/gustavnikolaj/received_events","type":"User","site_admin":false},"body":"The last commit on this PR contains a fix to #22. I know that it's bad practice to include more than one change in a PR, but the bug that it fixes is what caused me to rewrite the test suite in the first case.\r\n\r\nsupertest makes it anything but easy to work with these kinds of tests. For one, it masked this error for you (where your middleware ate the chunk that can get passed to res.end. I still don't understand why, but it ended up in .text on the response object, which is a property that supertest puts there, which is not in express, and which will never make it to the client sending the request.\r\n\r\nI didn't rewrite any of the existing tests, all of them are functionally equivalent.\r\n\r\nThe tests give way better output when they fail now too, which is one of the core goals of the unexpected testing framework.\r\n\r\nYou might find the documentation site for unexpected and the readme for unexpected-express useful:\r\nhttp://unexpected.github.io\r\nhttps://github.com/unexpectedjs/unexpected-express\r\n\r\nIf you have any questions, don't hesitate to ask questions!","created_at":"2015-05-27T11:52:22Z","updated_at":"2015-07-15T05:37:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a774fdede5dfc296d9a3f3e086e7406b757c54e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/24/commits","review_comments_url":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/24/comments","review_comment_url":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/axiomzen/express-interceptor/issues/24/comments","statuses_url":"https://api.github.com/repos/axiomzen/express-interceptor/statuses/969cc19f067bccdf8e906bc4720f65a00b480eaa","head":{"label":"gustavnikolaj:feature/unexpectedExpress","ref":"feature/unexpectedExpress","sha":"969cc19f067bccdf8e906bc4720f65a00b480eaa","user":{"login":"gustavnikolaj","id":1371503,"avatar_url":"https://avatars.githubusercontent.com/u/1371503?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavnikolaj","html_url":"https://github.com/gustavnikolaj","followers_url":"https://api.github.com/users/gustavnikolaj/followers","following_url":"https://api.github.com/users/gustavnikolaj/following{/other_user}","gists_url":"https://api.github.com/users/gustavnikolaj/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavnikolaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavnikolaj/subscriptions","organizations_url":"https://api.github.com/users/gustavnikolaj/orgs","repos_url":"https://api.github.com/users/gustavnikolaj/repos","events_url":"https://api.github.com/users/gustavnikolaj/events{/privacy}","received_events_url":"https://api.github.com/users/gustavnikolaj/received_events","type":"User","site_admin":false},"repo":{"id":36321457,"name":"express-interceptor","full_name":"gustavnikolaj/express-interceptor","owner":{"login":"gustavnikolaj","id":1371503,"avatar_url":"https://avatars.githubusercontent.com/u/1371503?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavnikolaj","html_url":"https://github.com/gustavnikolaj","followers_url":"https://api.github.com/users/gustavnikolaj/followers","following_url":"https://api.github.com/users/gustavnikolaj/following{/other_user}","gists_url":"https://api.github.com/users/gustavnikolaj/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavnikolaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavnikolaj/subscriptions","organizations_url":"https://api.github.com/users/gustavnikolaj/orgs","repos_url":"https://api.github.com/users/gustavnikolaj/repos","events_url":"https://api.github.com/users/gustavnikolaj/events{/privacy}","received_events_url":"https://api.github.com/users/gustavnikolaj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gustavnikolaj/express-interceptor","description":"A tiny interceptor of responses for Express","fork":true,"url":"https://api.github.com/repos/gustavnikolaj/express-interceptor","forks_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/forks","keys_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/teams","hooks_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/hooks","issue_events_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/issues/events{/number}","events_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/events","assignees_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/assignees{/user}","branches_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/branches{/branch}","tags_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/tags","blobs_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/git/refs{/sha}","trees_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/statuses/{sha}","languages_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/languages","stargazers_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/stargazers","contributors_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/contributors","subscribers_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/subscribers","subscription_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/subscription","commits_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/commits{/sha}","git_commits_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/git/commits{/sha}","comments_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/comments{/number}","issue_comment_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/issues/comments{/number}","contents_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/contents/{+path}","compare_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/merges","archive_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/downloads","issues_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/issues{/number}","pulls_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/pulls{/number}","milestones_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/milestones{/number}","notifications_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/labels{/name}","releases_url":"https://api.github.com/repos/gustavnikolaj/express-interceptor/releases{/id}","created_at":"2015-05-26T20:20:29Z","updated_at":"2015-05-26T20:20:29Z","pushed_at":"2015-07-14T18:42:12Z","git_url":"git://github.com/gustavnikolaj/express-interceptor.git","ssh_url":"git@github.com:gustavnikolaj/express-interceptor.git","clone_url":"https://github.com/gustavnikolaj/express-interceptor.git","svn_url":"https://github.com/gustavnikolaj/express-interceptor","homepage":"https://www.npmjs.com/package/express-interceptor","size":145,"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":"axiomzen:master","ref":"master","sha":"a6a24342eb9dd317c84c6bf3c1924f4e5da7d6f1","user":{"login":"axiomzen","id":3335861,"avatar_url":"https://avatars.githubusercontent.com/u/3335861?v=3","gravatar_id":"","url":"https://api.github.com/users/axiomzen","html_url":"https://github.com/axiomzen","followers_url":"https://api.github.com/users/axiomzen/followers","following_url":"https://api.github.com/users/axiomzen/following{/other_user}","gists_url":"https://api.github.com/users/axiomzen/gists{/gist_id}","starred_url":"https://api.github.com/users/axiomzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axiomzen/subscriptions","organizations_url":"https://api.github.com/users/axiomzen/orgs","repos_url":"https://api.github.com/users/axiomzen/repos","events_url":"https://api.github.com/users/axiomzen/events{/privacy}","received_events_url":"https://api.github.com/users/axiomzen/received_events","type":"Organization","site_admin":false},"repo":{"id":31748215,"name":"express-interceptor","full_name":"axiomzen/express-interceptor","owner":{"login":"axiomzen","id":3335861,"avatar_url":"https://avatars.githubusercontent.com/u/3335861?v=3","gravatar_id":"","url":"https://api.github.com/users/axiomzen","html_url":"https://github.com/axiomzen","followers_url":"https://api.github.com/users/axiomzen/followers","following_url":"https://api.github.com/users/axiomzen/following{/other_user}","gists_url":"https://api.github.com/users/axiomzen/gists{/gist_id}","starred_url":"https://api.github.com/users/axiomzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axiomzen/subscriptions","organizations_url":"https://api.github.com/users/axiomzen/orgs","repos_url":"https://api.github.com/users/axiomzen/repos","events_url":"https://api.github.com/users/axiomzen/events{/privacy}","received_events_url":"https://api.github.com/users/axiomzen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/axiomzen/express-interceptor","description":"A tiny interceptor of responses for Express","fork":false,"url":"https://api.github.com/repos/axiomzen/express-interceptor","forks_url":"https://api.github.com/repos/axiomzen/express-interceptor/forks","keys_url":"https://api.github.com/repos/axiomzen/express-interceptor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axiomzen/express-interceptor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axiomzen/express-interceptor/teams","hooks_url":"https://api.github.com/repos/axiomzen/express-interceptor/hooks","issue_events_url":"https://api.github.com/repos/axiomzen/express-interceptor/issues/events{/number}","events_url":"https://api.github.com/repos/axiomzen/express-interceptor/events","assignees_url":"https://api.github.com/repos/axiomzen/express-interceptor/assignees{/user}","branches_url":"https://api.github.com/repos/axiomzen/express-interceptor/branches{/branch}","tags_url":"https://api.github.com/repos/axiomzen/express-interceptor/tags","blobs_url":"https://api.github.com/repos/axiomzen/express-interceptor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axiomzen/express-interceptor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axiomzen/express-interceptor/git/refs{/sha}","trees_url":"https://api.github.com/repos/axiomzen/express-interceptor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axiomzen/express-interceptor/statuses/{sha}","languages_url":"https://api.github.com/repos/axiomzen/express-interceptor/languages","stargazers_url":"https://api.github.com/repos/axiomzen/express-interceptor/stargazers","contributors_url":"https://api.github.com/repos/axiomzen/express-interceptor/contributors","subscribers_url":"https://api.github.com/repos/axiomzen/express-interceptor/subscribers","subscription_url":"https://api.github.com/repos/axiomzen/express-interceptor/subscription","commits_url":"https://api.github.com/repos/axiomzen/express-interceptor/commits{/sha}","git_commits_url":"https://api.github.com/repos/axiomzen/express-interceptor/git/commits{/sha}","comments_url":"https://api.github.com/repos/axiomzen/express-interceptor/comments{/number}","issue_comment_url":"https://api.github.com/repos/axiomzen/express-interceptor/issues/comments{/number}","contents_url":"https://api.github.com/repos/axiomzen/express-interceptor/contents/{+path}","compare_url":"https://api.github.com/repos/axiomzen/express-interceptor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axiomzen/express-interceptor/merges","archive_url":"https://api.github.com/repos/axiomzen/express-interceptor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axiomzen/express-interceptor/downloads","issues_url":"https://api.github.com/repos/axiomzen/express-interceptor/issues{/number}","pulls_url":"https://api.github.com/repos/axiomzen/express-interceptor/pulls{/number}","milestones_url":"https://api.github.com/repos/axiomzen/express-interceptor/milestones{/number}","notifications_url":"https://api.github.com/repos/axiomzen/express-interceptor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axiomzen/express-interceptor/labels{/name}","releases_url":"https://api.github.com/repos/axiomzen/express-interceptor/releases{/id}","created_at":"2015-03-06T02:22:59Z","updated_at":"2015-05-25T19:35:51Z","pushed_at":"2015-07-14T18:42:12Z","git_url":"git://github.com/axiomzen/express-interceptor.git","ssh_url":"git@github.com:axiomzen/express-interceptor.git","clone_url":"https://github.com/axiomzen/express-interceptor.git","svn_url":"https://github.com/axiomzen/express-interceptor","homepage":"https://www.npmjs.com/package/express-interceptor","size":424,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/24"},"html":{"href":"https://github.com/axiomzen/express-interceptor/pull/24"},"issue":{"href":"https://api.github.com/repos/axiomzen/express-interceptor/issues/24"},"comments":{"href":"https://api.github.com/repos/axiomzen/express-interceptor/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/axiomzen/express-interceptor/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/axiomzen/express-interceptor/statuses/969cc19f067bccdf8e906bc4720f65a00b480eaa"}}}}