{"action":"created","comment":{"url":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/comments/37320600","id":37320600,"diff_hunk":"@@ -1,13 +1,15 @@\n-const FAILED_LINE = /at \\[object Object\\]\\.<anonymous> \\((.*)\\)/g;\n+const FAILED_LINES = /at \\[object Object\\]\\.<anonymous> \\((.*?):.*\\)/g;\n \n export default function (output = '') {\n-  // this could all probably fit into one regex...\n-  var failedSpecLines = output.match(FAILED_LINE);\n+  var output = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];\n \n-  if (!failedSpecLines) { return []; }\n-\n-  return failedSpecLines.map(function (line) {\n-    let path = line.match(/\\((.*):/)[1];\n-    return path.slice(0, [path.length - 2]);\n-  });\n-}\n+  var failedSpecLines = [];\n+  var match;\n+  //iterate over all matches and prevent adding a spec twice (e.g. when using multiCapabilities)\n+  while (match = FAILED_LINES.exec(output)) {\n+    if (failedSpecLines.indexOf(match[1]) == -1) {","path":"src/failed-spec-parser.js","position":20,"original_position":20,"commit_id":"edc710dea6f89c39260638119c023d95ef7ab5a8","original_commit_id":"edc710dea6f89c39260638119c023d95ef7ab5a8","user":{"login":"NickTomlin","id":1290336,"avatar_url":"https://avatars.githubusercontent.com/u/1290336?v=3","gravatar_id":"","url":"https://api.github.com/users/NickTomlin","html_url":"https://github.com/NickTomlin","followers_url":"https://api.github.com/users/NickTomlin/followers","following_url":"https://api.github.com/users/NickTomlin/following{/other_user}","gists_url":"https://api.github.com/users/NickTomlin/gists{/gist_id}","starred_url":"https://api.github.com/users/NickTomlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickTomlin/subscriptions","organizations_url":"https://api.github.com/users/NickTomlin/orgs","repos_url":"https://api.github.com/users/NickTomlin/repos","events_url":"https://api.github.com/users/NickTomlin/events{/privacy}","received_events_url":"https://api.github.com/users/NickTomlin/received_events","type":"User","site_admin":false},"body":"This is an awesome improvement. I wonder if this might be a good use case for a [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) which would accomplish the same thing without the need for `indexOf` checking","created_at":"2015-08-18T16:31:34Z","updated_at":"2015-08-18T16:31:34Z","html_url":"https://github.com/NickTomlin/protractor-flake/pull/1#discussion_r37320600","pull_request_url":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/comments/37320600"},"html":{"href":"https://github.com/NickTomlin/protractor-flake/pull/1#discussion_r37320600"},"pull_request":{"href":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/1","id":42708131,"html_url":"https://github.com/NickTomlin/protractor-flake/pull/1","diff_url":"https://github.com/NickTomlin/protractor-flake/pull/1.diff","patch_url":"https://github.com/NickTomlin/protractor-flake/pull/1.patch","issue_url":"https://api.github.com/repos/NickTomlin/protractor-flake/issues/1","number":1,"state":"open","locked":false,"title":"improved collection of failed specs","user":{"login":"odaems","id":6862398,"avatar_url":"https://avatars.githubusercontent.com/u/6862398?v=3","gravatar_id":"","url":"https://api.github.com/users/odaems","html_url":"https://github.com/odaems","followers_url":"https://api.github.com/users/odaems/followers","following_url":"https://api.github.com/users/odaems/following{/other_user}","gists_url":"https://api.github.com/users/odaems/gists{/gist_id}","starred_url":"https://api.github.com/users/odaems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odaems/subscriptions","organizations_url":"https://api.github.com/users/odaems/orgs","repos_url":"https://api.github.com/users/odaems/repos","events_url":"https://api.github.com/users/odaems/events{/privacy}","received_events_url":"https://api.github.com/users/odaems/received_events","type":"User","site_admin":false},"body":"regex now matches lazy (using '?' after '*' in group) instead of greedy avoiding the need for result slicing and potential problems with multidigit line numbers\r\nfailed specs only get added once (especially important when using multiCapabilities)","created_at":"2015-08-18T14:54:27Z","updated_at":"2015-08-18T16:31:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e570fff3c0d84aaa61990065f1d4cb21b6ea664","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/1/commits","review_comments_url":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/1/comments","review_comment_url":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NickTomlin/protractor-flake/issues/1/comments","statuses_url":"https://api.github.com/repos/NickTomlin/protractor-flake/statuses/edc710dea6f89c39260638119c023d95ef7ab5a8","head":{"label":"odaems:master","ref":"master","sha":"edc710dea6f89c39260638119c023d95ef7ab5a8","user":{"login":"odaems","id":6862398,"avatar_url":"https://avatars.githubusercontent.com/u/6862398?v=3","gravatar_id":"","url":"https://api.github.com/users/odaems","html_url":"https://github.com/odaems","followers_url":"https://api.github.com/users/odaems/followers","following_url":"https://api.github.com/users/odaems/following{/other_user}","gists_url":"https://api.github.com/users/odaems/gists{/gist_id}","starred_url":"https://api.github.com/users/odaems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odaems/subscriptions","organizations_url":"https://api.github.com/users/odaems/orgs","repos_url":"https://api.github.com/users/odaems/repos","events_url":"https://api.github.com/users/odaems/events{/privacy}","received_events_url":"https://api.github.com/users/odaems/received_events","type":"User","site_admin":false},"repo":{"id":40972220,"name":"protractor-flake","full_name":"odaems/protractor-flake","owner":{"login":"odaems","id":6862398,"avatar_url":"https://avatars.githubusercontent.com/u/6862398?v=3","gravatar_id":"","url":"https://api.github.com/users/odaems","html_url":"https://github.com/odaems","followers_url":"https://api.github.com/users/odaems/followers","following_url":"https://api.github.com/users/odaems/following{/other_user}","gists_url":"https://api.github.com/users/odaems/gists{/gist_id}","starred_url":"https://api.github.com/users/odaems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odaems/subscriptions","organizations_url":"https://api.github.com/users/odaems/orgs","repos_url":"https://api.github.com/users/odaems/repos","events_url":"https://api.github.com/users/odaems/events{/privacy}","received_events_url":"https://api.github.com/users/odaems/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/odaems/protractor-flake","description":"Rerun potentially flake protractor tests before failing.","fork":true,"url":"https://api.github.com/repos/odaems/protractor-flake","forks_url":"https://api.github.com/repos/odaems/protractor-flake/forks","keys_url":"https://api.github.com/repos/odaems/protractor-flake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odaems/protractor-flake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odaems/protractor-flake/teams","hooks_url":"https://api.github.com/repos/odaems/protractor-flake/hooks","issue_events_url":"https://api.github.com/repos/odaems/protractor-flake/issues/events{/number}","events_url":"https://api.github.com/repos/odaems/protractor-flake/events","assignees_url":"https://api.github.com/repos/odaems/protractor-flake/assignees{/user}","branches_url":"https://api.github.com/repos/odaems/protractor-flake/branches{/branch}","tags_url":"https://api.github.com/repos/odaems/protractor-flake/tags","blobs_url":"https://api.github.com/repos/odaems/protractor-flake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odaems/protractor-flake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odaems/protractor-flake/git/refs{/sha}","trees_url":"https://api.github.com/repos/odaems/protractor-flake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odaems/protractor-flake/statuses/{sha}","languages_url":"https://api.github.com/repos/odaems/protractor-flake/languages","stargazers_url":"https://api.github.com/repos/odaems/protractor-flake/stargazers","contributors_url":"https://api.github.com/repos/odaems/protractor-flake/contributors","subscribers_url":"https://api.github.com/repos/odaems/protractor-flake/subscribers","subscription_url":"https://api.github.com/repos/odaems/protractor-flake/subscription","commits_url":"https://api.github.com/repos/odaems/protractor-flake/commits{/sha}","git_commits_url":"https://api.github.com/repos/odaems/protractor-flake/git/commits{/sha}","comments_url":"https://api.github.com/repos/odaems/protractor-flake/comments{/number}","issue_comment_url":"https://api.github.com/repos/odaems/protractor-flake/issues/comments{/number}","contents_url":"https://api.github.com/repos/odaems/protractor-flake/contents/{+path}","compare_url":"https://api.github.com/repos/odaems/protractor-flake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odaems/protractor-flake/merges","archive_url":"https://api.github.com/repos/odaems/protractor-flake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odaems/protractor-flake/downloads","issues_url":"https://api.github.com/repos/odaems/protractor-flake/issues{/number}","pulls_url":"https://api.github.com/repos/odaems/protractor-flake/pulls{/number}","milestones_url":"https://api.github.com/repos/odaems/protractor-flake/milestones{/number}","notifications_url":"https://api.github.com/repos/odaems/protractor-flake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odaems/protractor-flake/labels{/name}","releases_url":"https://api.github.com/repos/odaems/protractor-flake/releases{/id}","created_at":"2015-08-18T13:02:19Z","updated_at":"2015-08-18T13:02:20Z","pushed_at":"2015-08-18T14:53:51Z","git_url":"git://github.com/odaems/protractor-flake.git","ssh_url":"git@github.com:odaems/protractor-flake.git","clone_url":"https://github.com/odaems/protractor-flake.git","svn_url":"https://github.com/odaems/protractor-flake","homepage":"","size":0,"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":"NickTomlin:master","ref":"master","sha":"1fa370a0bd4fe75f9072331f998648efb4d6f62c","user":{"login":"NickTomlin","id":1290336,"avatar_url":"https://avatars.githubusercontent.com/u/1290336?v=3","gravatar_id":"","url":"https://api.github.com/users/NickTomlin","html_url":"https://github.com/NickTomlin","followers_url":"https://api.github.com/users/NickTomlin/followers","following_url":"https://api.github.com/users/NickTomlin/following{/other_user}","gists_url":"https://api.github.com/users/NickTomlin/gists{/gist_id}","starred_url":"https://api.github.com/users/NickTomlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickTomlin/subscriptions","organizations_url":"https://api.github.com/users/NickTomlin/orgs","repos_url":"https://api.github.com/users/NickTomlin/repos","events_url":"https://api.github.com/users/NickTomlin/events{/privacy}","received_events_url":"https://api.github.com/users/NickTomlin/received_events","type":"User","site_admin":false},"repo":{"id":40843364,"name":"protractor-flake","full_name":"NickTomlin/protractor-flake","owner":{"login":"NickTomlin","id":1290336,"avatar_url":"https://avatars.githubusercontent.com/u/1290336?v=3","gravatar_id":"","url":"https://api.github.com/users/NickTomlin","html_url":"https://github.com/NickTomlin","followers_url":"https://api.github.com/users/NickTomlin/followers","following_url":"https://api.github.com/users/NickTomlin/following{/other_user}","gists_url":"https://api.github.com/users/NickTomlin/gists{/gist_id}","starred_url":"https://api.github.com/users/NickTomlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickTomlin/subscriptions","organizations_url":"https://api.github.com/users/NickTomlin/orgs","repos_url":"https://api.github.com/users/NickTomlin/repos","events_url":"https://api.github.com/users/NickTomlin/events{/privacy}","received_events_url":"https://api.github.com/users/NickTomlin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NickTomlin/protractor-flake","description":"Rerun potentially flake protractor tests before failing.","fork":false,"url":"https://api.github.com/repos/NickTomlin/protractor-flake","forks_url":"https://api.github.com/repos/NickTomlin/protractor-flake/forks","keys_url":"https://api.github.com/repos/NickTomlin/protractor-flake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NickTomlin/protractor-flake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NickTomlin/protractor-flake/teams","hooks_url":"https://api.github.com/repos/NickTomlin/protractor-flake/hooks","issue_events_url":"https://api.github.com/repos/NickTomlin/protractor-flake/issues/events{/number}","events_url":"https://api.github.com/repos/NickTomlin/protractor-flake/events","assignees_url":"https://api.github.com/repos/NickTomlin/protractor-flake/assignees{/user}","branches_url":"https://api.github.com/repos/NickTomlin/protractor-flake/branches{/branch}","tags_url":"https://api.github.com/repos/NickTomlin/protractor-flake/tags","blobs_url":"https://api.github.com/repos/NickTomlin/protractor-flake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NickTomlin/protractor-flake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NickTomlin/protractor-flake/git/refs{/sha}","trees_url":"https://api.github.com/repos/NickTomlin/protractor-flake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NickTomlin/protractor-flake/statuses/{sha}","languages_url":"https://api.github.com/repos/NickTomlin/protractor-flake/languages","stargazers_url":"https://api.github.com/repos/NickTomlin/protractor-flake/stargazers","contributors_url":"https://api.github.com/repos/NickTomlin/protractor-flake/contributors","subscribers_url":"https://api.github.com/repos/NickTomlin/protractor-flake/subscribers","subscription_url":"https://api.github.com/repos/NickTomlin/protractor-flake/subscription","commits_url":"https://api.github.com/repos/NickTomlin/protractor-flake/commits{/sha}","git_commits_url":"https://api.github.com/repos/NickTomlin/protractor-flake/git/commits{/sha}","comments_url":"https://api.github.com/repos/NickTomlin/protractor-flake/comments{/number}","issue_comment_url":"https://api.github.com/repos/NickTomlin/protractor-flake/issues/comments{/number}","contents_url":"https://api.github.com/repos/NickTomlin/protractor-flake/contents/{+path}","compare_url":"https://api.github.com/repos/NickTomlin/protractor-flake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NickTomlin/protractor-flake/merges","archive_url":"https://api.github.com/repos/NickTomlin/protractor-flake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NickTomlin/protractor-flake/downloads","issues_url":"https://api.github.com/repos/NickTomlin/protractor-flake/issues{/number}","pulls_url":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls{/number}","milestones_url":"https://api.github.com/repos/NickTomlin/protractor-flake/milestones{/number}","notifications_url":"https://api.github.com/repos/NickTomlin/protractor-flake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NickTomlin/protractor-flake/labels{/name}","releases_url":"https://api.github.com/repos/NickTomlin/protractor-flake/releases{/id}","created_at":"2015-08-16T21:53:27Z","updated_at":"2015-08-16T21:56:52Z","pushed_at":"2015-08-18T14:54:27Z","git_url":"git://github.com/NickTomlin/protractor-flake.git","ssh_url":"git@github.com:NickTomlin/protractor-flake.git","clone_url":"https://github.com/NickTomlin/protractor-flake.git","svn_url":"https://github.com/NickTomlin/protractor-flake","homepage":"","size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/1"},"html":{"href":"https://github.com/NickTomlin/protractor-flake/pull/1"},"issue":{"href":"https://api.github.com/repos/NickTomlin/protractor-flake/issues/1"},"comments":{"href":"https://api.github.com/repos/NickTomlin/protractor-flake/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NickTomlin/protractor-flake/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/NickTomlin/protractor-flake/statuses/edc710dea6f89c39260638119c023d95ef7ab5a8"}}}}