GitHub PullRequestReviewCommentEvent at 2014-06-17 22:11:26
Repository: qunit-reporter-junit
Actor: Krinkle
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/comments/13889244","id":13889244,"diff_hunk":"@@ -29,9 +29,24 @@\n \t\t};\n \t});\n \n+\tfunction getUsefulModuleName(dataName) {\n+\t\ttry {\n+\t\t\tif(dataName === undefined) {\n+\t\t\t\tvar i = location.pathname.lastIndexOf('/');\n+\t\t\t\tvar name = location.pathname.substring(i + 1, location.pathname.length);\n+\t\t\t\ti = name.indexOf('.html', name.length - '.html'.length);\n+\t\t\t\tif(i !== -1) {\n+\t\t\t\t\tname = name.substring(0, i);\n+\t\t\t\t}\n+\t\t\t\treturn name;\n+\t\t\t}\n+\t\t} catch(e) {}","path":"qunit-reporter-junit.js","position":24,"original_position":24,"commit_id":"02968ff585f233e6518bebc1b7c4ef7eec5a8e9e","original_commit_id":"02968ff585f233e6518bebc1b7c4ef7eec5a8e9e","user":{"login":"Krinkle","id":156867,"avatar_url":"https://avatars.githubusercontent.com/u/156867?","gravatar_id":"49061e8503ca321a8045c9065963a8c6","url":"https://api.github.com/users/Krinkle","html_url":"https://github.com/Krinkle","followers_url":"https://api.github.com/users/Krinkle/followers","following_url":"https://api.github.com/users/Krinkle/following{/other_user}","gists_url":"https://api.github.com/users/Krinkle/gists{/gist_id}","starred_url":"https://api.github.com/users/Krinkle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krinkle/subscriptions","organizations_url":"https://api.github.com/users/Krinkle/orgs","repos_url":"https://api.github.com/users/Krinkle/repos","events_url":"https://api.github.com/users/Krinkle/events{/privacy}","received_events_url":"https://api.github.com/users/Krinkle/received_events","type":"User","site_admin":false},"body":"Which part of this code block are you expecting might fail? Certainly the if statement doesn't need to be inside, which means you can bypass try/catch if the condition is false.","created_at":"2014-06-17T22:11:26Z","updated_at":"2014-06-17T22:11:26Z","html_url":"https://github.com/jquery/qunit-reporter-junit/pull/9#discussion_r13889244","pull_request_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/comments/13889244"},"html":{"href":"https://github.com/jquery/qunit-reporter-junit/pull/9#discussion_r13889244"},"pull_request":{"href":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/9","id":7290031,"html_url":"https://github.com/jquery/qunit-reporter-junit/pull/9","diff_url":"https://github.com/jquery/qunit-reporter-junit/pull/9.diff","patch_url":"https://github.com/jquery/qunit-reporter-junit/pull/9.patch","issue_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/issues/9","number":9,"state":"open","title":"multiple current tests and meaningful module name","user":{"login":"reinsch82","id":5129074,"avatar_url":"https://avatars.githubusercontent.com/u/5129074?","gravatar_id":"208234b3bb96baaa87ca3f87e93ee3b7","url":"https://api.github.com/users/reinsch82","html_url":"https://github.com/reinsch82","followers_url":"https://api.github.com/users/reinsch82/followers","following_url":"https://api.github.com/users/reinsch82/following{/other_user}","gists_url":"https://api.github.com/users/reinsch82/gists{/gist_id}","starred_url":"https://api.github.com/users/reinsch82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinsch82/subscriptions","organizations_url":"https://api.github.com/users/reinsch82/orgs","repos_url":"https://api.github.com/users/reinsch82/repos","events_url":"https://api.github.com/users/reinsch82/events{/privacy}","received_events_url":"https://api.github.com/users/reinsch82/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nWe ran across this issue when we tried to use qunit-reporter-junit with phantomjs and asynchronous tests.\r\nIt seems there is a legal case where the testStart callback is called for several tests in a row although although the prior one hasn't ended yet so I basically extended the currentTest variable to be a dictionary of current tests. This solved the problem for us.\r\nI also implemented a method that tries to provide a meaningful modul name in case the test doesn't provide one, which makes it better for some cases and at least not worse for others.\r\n\r\nregards\r\n\r\nReinhold\r\n","created_at":"2013-07-31T12:16:57Z","updated_at":"2014-06-17T22:11:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd02d96cdfb18a72478a282d232f2478c1cf574a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/9/commits","review_comments_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/9/comments","review_comment_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/issues/9/comments","statuses_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/statuses/02968ff585f233e6518bebc1b7c4ef7eec5a8e9e","head":{"label":"reinsch82:master","ref":"master","sha":"02968ff585f233e6518bebc1b7c4ef7eec5a8e9e","user":{"login":"reinsch82","id":5129074,"avatar_url":"https://avatars.githubusercontent.com/u/5129074?","gravatar_id":"208234b3bb96baaa87ca3f87e93ee3b7","url":"https://api.github.com/users/reinsch82","html_url":"https://github.com/reinsch82","followers_url":"https://api.github.com/users/reinsch82/followers","following_url":"https://api.github.com/users/reinsch82/following{/other_user}","gists_url":"https://api.github.com/users/reinsch82/gists{/gist_id}","starred_url":"https://api.github.com/users/reinsch82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinsch82/subscriptions","organizations_url":"https://api.github.com/users/reinsch82/orgs","repos_url":"https://api.github.com/users/reinsch82/repos","events_url":"https://api.github.com/users/reinsch82/events{/privacy}","received_events_url":"https://api.github.com/users/reinsch82/received_events","type":"User","site_admin":false},"repo":{"id":11789818,"name":"qunit-reporter-junit","full_name":"reinsch82/qunit-reporter-junit","owner":{"login":"reinsch82","id":5129074,"avatar_url":"https://avatars.githubusercontent.com/u/5129074?","gravatar_id":"208234b3bb96baaa87ca3f87e93ee3b7","url":"https://api.github.com/users/reinsch82","html_url":"https://github.com/reinsch82","followers_url":"https://api.github.com/users/reinsch82/followers","following_url":"https://api.github.com/users/reinsch82/following{/other_user}","gists_url":"https://api.github.com/users/reinsch82/gists{/gist_id}","starred_url":"https://api.github.com/users/reinsch82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinsch82/subscriptions","organizations_url":"https://api.github.com/users/reinsch82/orgs","repos_url":"https://api.github.com/users/reinsch82/repos","events_url":"https://api.github.com/users/reinsch82/events{/privacy}","received_events_url":"https://api.github.com/users/reinsch82/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/reinsch82/qunit-reporter-junit","description":"A QUnit plugin for producing JUnit-style XML test reports.","fork":true,"url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit","forks_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/forks","keys_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/teams","hooks_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/hooks","issue_events_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/issues/events{/number}","events_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/events","assignees_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/assignees{/user}","branches_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/branches{/branch}","tags_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/tags","blobs_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/git/refs{/sha}","trees_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/statuses/{sha}","languages_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/languages","stargazers_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/stargazers","contributors_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/contributors","subscribers_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/subscribers","subscription_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/subscription","commits_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/commits{/sha}","git_commits_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/git/commits{/sha}","comments_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/comments{/number}","issue_comment_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/issues/comments/{number}","contents_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/contents/{+path}","compare_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/merges","archive_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/downloads","issues_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/issues{/number}","pulls_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/pulls{/number}","milestones_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/milestones{/number}","notifications_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/labels{/name}","releases_url":"https://api.github.com/repos/reinsch82/qunit-reporter-junit/releases{/id}","created_at":"2013-07-31T11:55:28Z","updated_at":"2014-03-07T08:02:31Z","pushed_at":"2013-07-31T16:17:14Z","git_url":"git://github.com/reinsch82/qunit-reporter-junit.git","ssh_url":"git@github.com:reinsch82/qunit-reporter-junit.git","clone_url":"https://github.com/reinsch82/qunit-reporter-junit.git","svn_url":"https://github.com/reinsch82/qunit-reporter-junit","homepage":"","size":69,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"d27baba6127d2d3b5232d3c3524552931c42ddb3","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?","gravatar_id":"6906f317a4733f4379b06c32229ef02f","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":8297995,"name":"qunit-reporter-junit","full_name":"jquery/qunit-reporter-junit","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?","gravatar_id":"6906f317a4733f4379b06c32229ef02f","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/qunit-reporter-junit","description":"A QUnit plugin for producing JUnit-style XML test reports.","fork":false,"url":"https://api.github.com/repos/jquery/qunit-reporter-junit","forks_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/forks","keys_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/teams","hooks_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/hooks","issue_events_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/events","assignees_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/tags","blobs_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/languages","stargazers_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/stargazers","contributors_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/contributors","subscribers_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/subscribers","subscription_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/subscription","commits_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/issues/comments/{number}","contents_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/merges","archive_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/downloads","issues_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/labels{/name}","releases_url":"https://api.github.com/repos/jquery/qunit-reporter-junit/releases{/id}","created_at":"2013-02-19T19:49:58Z","updated_at":"2014-05-25T19:02:04Z","pushed_at":"2014-05-25T18:56:34Z","git_url":"git://github.com/jquery/qunit-reporter-junit.git","ssh_url":"git@github.com:jquery/qunit-reporter-junit.git","clone_url":"https://github.com/jquery/qunit-reporter-junit.git","svn_url":"https://github.com/jquery/qunit-reporter-junit","homepage":"","size":315,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":15,"mirror_url":null,"open_issues_count":7,"forks":15,"open_issues":7,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/9"},"html":{"href":"https://github.com/jquery/qunit-reporter-junit/pull/9"},"issue":{"href":"https://api.github.com/repos/jquery/qunit-reporter-junit/issues/9"},"comments":{"href":"https://api.github.com/repos/jquery/qunit-reporter-junit/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jquery/qunit-reporter-junit/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/qunit-reporter-junit/statuses/02968ff585f233e6518bebc1b7c4ef7eec5a8e9e"}}}}