{"action":"created","comment":{"url":"https://api.github.com/repos/e14n/pump.io/pulls/comments/49220623","id":49220623,"diff_hunk":"@@ -335,24 +351,38 @@ suite.addBatch({\n                         requestToken(cl, this);\n                     },\n                     function(err, rt) {\n+                        var self = this;\n+\n                         if (err) throw err;\n-                        br = new Browser({runScripts: false});\n-                        br.visit(\"http://localhost:4815/oauth/authorize?oauth_token=\" + rt.token, this);\n+                        br = new Browser({runScripts: false}); //faster without scripts...\n+                        Step(\n+                            function(){\n+                        \t    br.visit(\"http://localhost:4815/oauth/authorize?oauth_token=\" + rt.token, this);\n+                            },\n+                            function(){\n+                                self(!br.success,br);\n+                            }\n+                        );\n                     },\n                     function(err, br) {\n+                        var self = this;\n+\n                         if (err) throw err;\n-                        if (!br.success) throw new Error(\"Browser error\");\n-                        br.fill(\"username\", \"dormouse\", this);\n-                    },\n-                    function(err) {\n-                        if (err) throw err;\n-                        br.fill(\"password\", \"BADPASSWORD\", this);\n-                    },\n-                    function(err) {\n-                        if (err) throw err;\n-                        br.pressButton(\"#authenticate\", this);\n+                        br.assert.success();\n+\n+                        br\n+                            .fill(\"username\", \"dormouse\", this)","path":"test/oauth-authorization-test.js","position":73,"original_position":73,"commit_id":"00bc3cf0ae728f5facf436444848dcd09239724e","original_commit_id":"5226af3d2b9231a10ea94246ce15015d34a55f5f","user":{"login":"profOnno","id":6004086,"avatar_url":"https://avatars.githubusercontent.com/u/6004086?v=3","gravatar_id":"","url":"https://api.github.com/users/profOnno","html_url":"https://github.com/profOnno","followers_url":"https://api.github.com/users/profOnno/followers","following_url":"https://api.github.com/users/profOnno/following{/other_user}","gists_url":"https://api.github.com/users/profOnno/gists{/gist_id}","starred_url":"https://api.github.com/users/profOnno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profOnno/subscriptions","organizations_url":"https://api.github.com/users/profOnno/orgs","repos_url":"https://api.github.com/users/profOnno/repos","events_url":"https://api.github.com/users/profOnno/events{/privacy}","received_events_url":"https://api.github.com/users/profOnno/received_events","type":"User","site_admin":false},"body":"I don't know if jscs can handle this. Indentation needs to be 4 spaces.\r\n\r\nWith \r\n```\r\nbr.fill(a)\r\n  .funky(a,function(){\r\n      var identHowMuch = lastBrIndent+4; // ?\r\n  });\r\n```\r\nthe indentation when nesting a function expression is kind off weird.\r\nSo I prefer newline with one indent.\r\n```\r\nbr\r\n    .fill(a)\r\n    .funky(a,function(){\r\n        var identHowMuch = lastBrIndent+4; // ?\r\n    });\r\n```\r\nThe bad would be this indent has no closing bracket or something.\r\n```\r\nif(true){\r\n    object\r\n        .dothis()\r\n        .dothat(function(){\r\n            nop();\r\n        });\r\n}\r\n```\r\nThere is a drop of 8 spaces  after `});` that's a kind of weird, but thats also (even more) the case with using the `newline indent objectname.length`, you'll get a variable drop  and not a 4 or 8 space drop.\r\nA code style could be to close a method chain with a  comment:\r\n```\r\nif(true){\r\n    object\r\n        .dothis()\r\n        .dothat(function(){\r\n            nop();\r\n        });\r\n    // end chain\r\n}\r\n```\r\n\r\n\r\n[this project](https://github.com/DarkPark/jscs) also uses a new line (search for method chain) for method chaining. [Stackoverflow](http://stackoverflow.com/questions/29784473/linting-promises-in-javascript) has some info on this (hmm not all related but got the identation). There an [issue](https://github.com/jscs-dev/node-jscs/issues/1736) at jscs-dev.\r\n\r\nFor method chains (and promises) I like the chaining to begin on a new line. Its kind of  c++ doing `using namespace obj` only there you don't need a period to use the function.\r\n\r\nBut feel free to disagree. \r\nI've seen http://javascript.info/tutorial/with-operator#why-with-is-deprecated . Using this analogy the example code would be:\r\n```\r\nbr.fill(a)\r\nbr.funky(a,function(){\r\n    var identHowMuch = lastBrIndent+4; // ?\r\n });\r\n```","created_at":"2016-01-08T18:32:19Z","updated_at":"2016-01-08T18:32:19Z","html_url":"https://github.com/e14n/pump.io/pull/1136#discussion_r49220623","pull_request_url":"https://api.github.com/repos/e14n/pump.io/pulls/1136","_links":{"self":{"href":"https://api.github.com/repos/e14n/pump.io/pulls/comments/49220623"},"html":{"href":"https://github.com/e14n/pump.io/pull/1136#discussion_r49220623"},"pull_request":{"href":"https://api.github.com/repos/e14n/pump.io/pulls/1136"}}},"pull_request":{"url":"https://api.github.com/repos/e14n/pump.io/pulls/1136","id":53617880,"html_url":"https://github.com/e14n/pump.io/pull/1136","diff_url":"https://github.com/e14n/pump.io/pull/1136.diff","patch_url":"https://github.com/e14n/pump.io/pull/1136.patch","issue_url":"https://api.github.com/repos/e14n/pump.io/issues/1136","number":1136,"state":"open","locked":false,"title":"Make the tests work again","user":{"login":"profOnno","id":6004086,"avatar_url":"https://avatars.githubusercontent.com/u/6004086?v=3","gravatar_id":"","url":"https://api.github.com/users/profOnno","html_url":"https://github.com/profOnno","followers_url":"https://api.github.com/users/profOnno/followers","following_url":"https://api.github.com/users/profOnno/following{/other_user}","gists_url":"https://api.github.com/users/profOnno/gists{/gist_id}","starred_url":"https://api.github.com/users/profOnno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profOnno/subscriptions","organizations_url":"https://api.github.com/users/profOnno/orgs","repos_url":"https://api.github.com/users/profOnno/repos","events_url":"https://api.github.com/users/profOnno/events{/privacy}","received_events_url":"https://api.github.com/users/profOnno/received_events","type":"User","site_admin":false},"body":"This will also work with node v4. But then zombie has to be version 4. Travis-ci won't work (yet) with node 4. (building native extensions requires C++11-compatible compiler), maybe with the newer docker travis-ci.","created_at":"2015-12-14T20:33:31Z","updated_at":"2016-01-08T18:32:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"649362733ed83e2b48a392d23c169eed48050c0d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/e14n/pump.io/pulls/1136/commits","review_comments_url":"https://api.github.com/repos/e14n/pump.io/pulls/1136/comments","review_comment_url":"https://api.github.com/repos/e14n/pump.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/e14n/pump.io/issues/1136/comments","statuses_url":"https://api.github.com/repos/e14n/pump.io/statuses/00bc3cf0ae728f5facf436444848dcd09239724e","head":{"label":"profOnno:r4p","ref":"r4p","sha":"00bc3cf0ae728f5facf436444848dcd09239724e","user":{"login":"profOnno","id":6004086,"avatar_url":"https://avatars.githubusercontent.com/u/6004086?v=3","gravatar_id":"","url":"https://api.github.com/users/profOnno","html_url":"https://github.com/profOnno","followers_url":"https://api.github.com/users/profOnno/followers","following_url":"https://api.github.com/users/profOnno/following{/other_user}","gists_url":"https://api.github.com/users/profOnno/gists{/gist_id}","starred_url":"https://api.github.com/users/profOnno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profOnno/subscriptions","organizations_url":"https://api.github.com/users/profOnno/orgs","repos_url":"https://api.github.com/users/profOnno/repos","events_url":"https://api.github.com/users/profOnno/events{/privacy}","received_events_url":"https://api.github.com/users/profOnno/received_events","type":"User","site_admin":false},"repo":{"id":39681702,"name":"pump.io","full_name":"profOnno/pump.io","owner":{"login":"profOnno","id":6004086,"avatar_url":"https://avatars.githubusercontent.com/u/6004086?v=3","gravatar_id":"","url":"https://api.github.com/users/profOnno","html_url":"https://github.com/profOnno","followers_url":"https://api.github.com/users/profOnno/followers","following_url":"https://api.github.com/users/profOnno/following{/other_user}","gists_url":"https://api.github.com/users/profOnno/gists{/gist_id}","starred_url":"https://api.github.com/users/profOnno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profOnno/subscriptions","organizations_url":"https://api.github.com/users/profOnno/orgs","repos_url":"https://api.github.com/users/profOnno/repos","events_url":"https://api.github.com/users/profOnno/events{/privacy}","received_events_url":"https://api.github.com/users/profOnno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/profOnno/pump.io","description":"Social server with an ActivityStreams API","fork":true,"url":"https://api.github.com/repos/profOnno/pump.io","forks_url":"https://api.github.com/repos/profOnno/pump.io/forks","keys_url":"https://api.github.com/repos/profOnno/pump.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/profOnno/pump.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/profOnno/pump.io/teams","hooks_url":"https://api.github.com/repos/profOnno/pump.io/hooks","issue_events_url":"https://api.github.com/repos/profOnno/pump.io/issues/events{/number}","events_url":"https://api.github.com/repos/profOnno/pump.io/events","assignees_url":"https://api.github.com/repos/profOnno/pump.io/assignees{/user}","branches_url":"https://api.github.com/repos/profOnno/pump.io/branches{/branch}","tags_url":"https://api.github.com/repos/profOnno/pump.io/tags","blobs_url":"https://api.github.com/repos/profOnno/pump.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/profOnno/pump.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/profOnno/pump.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/profOnno/pump.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/profOnno/pump.io/statuses/{sha}","languages_url":"https://api.github.com/repos/profOnno/pump.io/languages","stargazers_url":"https://api.github.com/repos/profOnno/pump.io/stargazers","contributors_url":"https://api.github.com/repos/profOnno/pump.io/contributors","subscribers_url":"https://api.github.com/repos/profOnno/pump.io/subscribers","subscription_url":"https://api.github.com/repos/profOnno/pump.io/subscription","commits_url":"https://api.github.com/repos/profOnno/pump.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/profOnno/pump.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/profOnno/pump.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/profOnno/pump.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/profOnno/pump.io/contents/{+path}","compare_url":"https://api.github.com/repos/profOnno/pump.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/profOnno/pump.io/merges","archive_url":"https://api.github.com/repos/profOnno/pump.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/profOnno/pump.io/downloads","issues_url":"https://api.github.com/repos/profOnno/pump.io/issues{/number}","pulls_url":"https://api.github.com/repos/profOnno/pump.io/pulls{/number}","milestones_url":"https://api.github.com/repos/profOnno/pump.io/milestones{/number}","notifications_url":"https://api.github.com/repos/profOnno/pump.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/profOnno/pump.io/labels{/name}","releases_url":"https://api.github.com/repos/profOnno/pump.io/releases{/id}","created_at":"2015-07-25T11:10:00Z","updated_at":"2015-08-27T20:56:40Z","pushed_at":"2016-01-08T16:04:59Z","git_url":"git://github.com/profOnno/pump.io.git","ssh_url":"git@github.com:profOnno/pump.io.git","clone_url":"https://github.com/profOnno/pump.io.git","svn_url":"https://github.com/profOnno/pump.io","homepage":"http://pump.io/","size":8886,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"base":{"label":"e14n:master","ref":"master","sha":"d454e9d7c7d024cb4c3ea0828b0343c50db1b3b5","user":{"login":"e14n","id":2396961,"avatar_url":"https://avatars.githubusercontent.com/u/2396961?v=3","gravatar_id":"","url":"https://api.github.com/users/e14n","html_url":"https://github.com/e14n","followers_url":"https://api.github.com/users/e14n/followers","following_url":"https://api.github.com/users/e14n/following{/other_user}","gists_url":"https://api.github.com/users/e14n/gists{/gist_id}","starred_url":"https://api.github.com/users/e14n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e14n/subscriptions","organizations_url":"https://api.github.com/users/e14n/orgs","repos_url":"https://api.github.com/users/e14n/repos","events_url":"https://api.github.com/users/e14n/events{/privacy}","received_events_url":"https://api.github.com/users/e14n/received_events","type":"Organization","site_admin":false},"repo":{"id":2314534,"name":"pump.io","full_name":"e14n/pump.io","owner":{"login":"e14n","id":2396961,"avatar_url":"https://avatars.githubusercontent.com/u/2396961?v=3","gravatar_id":"","url":"https://api.github.com/users/e14n","html_url":"https://github.com/e14n","followers_url":"https://api.github.com/users/e14n/followers","following_url":"https://api.github.com/users/e14n/following{/other_user}","gists_url":"https://api.github.com/users/e14n/gists{/gist_id}","starred_url":"https://api.github.com/users/e14n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e14n/subscriptions","organizations_url":"https://api.github.com/users/e14n/orgs","repos_url":"https://api.github.com/users/e14n/repos","events_url":"https://api.github.com/users/e14n/events{/privacy}","received_events_url":"https://api.github.com/users/e14n/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/e14n/pump.io","description":"Social server with an ActivityStreams API","fork":false,"url":"https://api.github.com/repos/e14n/pump.io","forks_url":"https://api.github.com/repos/e14n/pump.io/forks","keys_url":"https://api.github.com/repos/e14n/pump.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/e14n/pump.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/e14n/pump.io/teams","hooks_url":"https://api.github.com/repos/e14n/pump.io/hooks","issue_events_url":"https://api.github.com/repos/e14n/pump.io/issues/events{/number}","events_url":"https://api.github.com/repos/e14n/pump.io/events","assignees_url":"https://api.github.com/repos/e14n/pump.io/assignees{/user}","branches_url":"https://api.github.com/repos/e14n/pump.io/branches{/branch}","tags_url":"https://api.github.com/repos/e14n/pump.io/tags","blobs_url":"https://api.github.com/repos/e14n/pump.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/e14n/pump.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/e14n/pump.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/e14n/pump.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/e14n/pump.io/statuses/{sha}","languages_url":"https://api.github.com/repos/e14n/pump.io/languages","stargazers_url":"https://api.github.com/repos/e14n/pump.io/stargazers","contributors_url":"https://api.github.com/repos/e14n/pump.io/contributors","subscribers_url":"https://api.github.com/repos/e14n/pump.io/subscribers","subscription_url":"https://api.github.com/repos/e14n/pump.io/subscription","commits_url":"https://api.github.com/repos/e14n/pump.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/e14n/pump.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/e14n/pump.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/e14n/pump.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/e14n/pump.io/contents/{+path}","compare_url":"https://api.github.com/repos/e14n/pump.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/e14n/pump.io/merges","archive_url":"https://api.github.com/repos/e14n/pump.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/e14n/pump.io/downloads","issues_url":"https://api.github.com/repos/e14n/pump.io/issues{/number}","pulls_url":"https://api.github.com/repos/e14n/pump.io/pulls{/number}","milestones_url":"https://api.github.com/repos/e14n/pump.io/milestones{/number}","notifications_url":"https://api.github.com/repos/e14n/pump.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/e14n/pump.io/labels{/name}","releases_url":"https://api.github.com/repos/e14n/pump.io/releases{/id}","created_at":"2011-09-02T15:07:31Z","updated_at":"2016-01-07T08:25:40Z","pushed_at":"2016-01-08T16:05:00Z","git_url":"git://github.com/e14n/pump.io.git","ssh_url":"git@github.com:e14n/pump.io.git","clone_url":"https://github.com/e14n/pump.io.git","svn_url":"https://github.com/e14n/pump.io","homepage":"http://pump.io/","size":12216,"stargazers_count":1345,"watchers_count":1345,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":244,"mirror_url":null,"open_issues_count":490,"forks":244,"open_issues":490,"watchers":1345,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/e14n/pump.io/pulls/1136"},"html":{"href":"https://github.com/e14n/pump.io/pull/1136"},"issue":{"href":"https://api.github.com/repos/e14n/pump.io/issues/1136"},"comments":{"href":"https://api.github.com/repos/e14n/pump.io/issues/1136/comments"},"review_comments":{"href":"https://api.github.com/repos/e14n/pump.io/pulls/1136/comments"},"review_comment":{"href":"https://api.github.com/repos/e14n/pump.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/e14n/pump.io/pulls/1136/commits"},"statuses":{"href":"https://api.github.com/repos/e14n/pump.io/statuses/00bc3cf0ae728f5facf436444848dcd09239724e"}}}}