{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/jest/pulls/comments/109237478","pull_request_review_id":30332181,"id":109237478,"diff_hunk":"@@ -376,12 +385,75 @@ class TestRunner {\n       this.addReporter(new CoverageReporter());\n     }\n \n-    this.addReporter(new SummaryReporter());\n     if (config.notify) {\n       this.addReporter(new NotifyReporter(this._startRun));\n     }\n   }\n \n+  /**\n+   * _setupDefaultReporters\n+   * Method for setting up the default reporters\n+   */\n+  _setupDefaultReporters() {\n+    const config = this._config;\n+\n+    this.addReporter(\n+      config.verbose\n+        ? new VerboseReporter(config)\n+        : new DefaultReporter()\n+    );\n+\n+    this.addReporter(new SummaryReporter());\n+  }\n+\n+  /**\n+   * Add Custom reporters to Jest\n+   * Custom reporters can be added to Jest using the reporters option in Jest\n+   * Config. The format for adding a custom reporter is following\n+   *\n+   * \"reporters\": [\n+   *    [\"reporterPath/packageName\", { option1: 'fasklj' }], \n+   *    // Format if we want to specify options\n+   *    \n+   *    \"reporterName\"\n+   *    // Format if we don't want to specify any options\n+   * ]\n+   */\n+  _addCustomReporters(reporters: any) {","path":"packages/jest-cli/src/TestRunner.js","position":77,"original_position":77,"commit_id":"7cc7aea24b865f11e74242555b175849dffa7702","original_commit_id":"7cc7aea24b865f11e74242555b175849dffa7702","user":{"login":"abdulhannanali","id":8170969,"avatar_url":"https://avatars1.githubusercontent.com/u/8170969?v=3","gravatar_id":"","url":"https://api.github.com/users/abdulhannanali","html_url":"https://github.com/abdulhannanali","followers_url":"https://api.github.com/users/abdulhannanali/followers","following_url":"https://api.github.com/users/abdulhannanali/following{/other_user}","gists_url":"https://api.github.com/users/abdulhannanali/gists{/gist_id}","starred_url":"https://api.github.com/users/abdulhannanali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdulhannanali/subscriptions","organizations_url":"https://api.github.com/users/abdulhannanali/orgs","repos_url":"https://api.github.com/users/abdulhannanali/repos","events_url":"https://api.github.com/users/abdulhannanali/events{/privacy}","received_events_url":"https://api.github.com/users/abdulhannanali/received_events","type":"User","site_admin":false},"body":"@bookman25 Thanks for pointing it out, this will be used by the `_setupReporters`, based on my conversation with Christop and Dmitrii, I am making a few changes on how the reporters options are passed in the configuration. ","created_at":"2017-03-31T19:51:13Z","updated_at":"2017-03-31T19:51:13Z","html_url":"https://github.com/facebook/jest/pull/3064#discussion_r109237478","pull_request_url":"https://api.github.com/repos/facebook/jest/pulls/3064","_links":{"self":{"href":"https://api.github.com/repos/facebook/jest/pulls/comments/109237478"},"html":{"href":"https://github.com/facebook/jest/pull/3064#discussion_r109237478"},"pull_request":{"href":"https://api.github.com/repos/facebook/jest/pulls/3064"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/jest/pulls/3064","id":109096234,"html_url":"https://github.com/facebook/jest/pull/3064","diff_url":"https://github.com/facebook/jest/pull/3064.diff","patch_url":"https://github.com/facebook/jest/pull/3064.patch","issue_url":"https://api.github.com/repos/facebook/jest/issues/3064","number":3064,"state":"open","locked":false,"title":"[WIP] Custom reporter integration","user":{"login":"abdulhannanali","id":8170969,"avatar_url":"https://avatars1.githubusercontent.com/u/8170969?v=3","gravatar_id":"","url":"https://api.github.com/users/abdulhannanali","html_url":"https://github.com/abdulhannanali","followers_url":"https://api.github.com/users/abdulhannanali/followers","following_url":"https://api.github.com/users/abdulhannanali/following{/other_user}","gists_url":"https://api.github.com/users/abdulhannanali/gists{/gist_id}","starred_url":"https://api.github.com/users/abdulhannanali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdulhannanali/subscriptions","organizations_url":"https://api.github.com/users/abdulhannanali/orgs","repos_url":"https://api.github.com/users/abdulhannanali/repos","events_url":"https://api.github.com/users/abdulhannanali/events{/privacy}","received_events_url":"https://api.github.com/users/abdulhannanali/received_events","type":"User","site_admin":false},"body":"<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. -->\r\n\r\n**Summary**\r\nThis PR adds the ability to specify custom reporter to be used with Jest. Right now, there's no way for the user to specify the custom reporter they want to use, without tinkering the internals. This let's them specify the Custom reporter(s) if any users want to use with their tests.\r\n\r\nThis PR relies heavily on the work @dmitriiabramov did in #2115 for adding XUnitReporter. Right now, only the interface through which we can use different reporters has been developed. Reporters such as Nyan and XUnitReporter are work in progress. \r\n\r\n<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->\r\nThis PR reuses \r\n\r\n**Test plan**\r\n\r\n<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. -->\r\n Integration tests for custom reporters are work in progress. ","created_at":"2017-03-04T06:13:07Z","updated_at":"2017-03-31T19:51:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c87543fd4715e7c92ea8623f182a490dfbad9ccd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/jest/pulls/3064/commits","review_comments_url":"https://api.github.com/repos/facebook/jest/pulls/3064/comments","review_comment_url":"https://api.github.com/repos/facebook/jest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/jest/issues/3064/comments","statuses_url":"https://api.github.com/repos/facebook/jest/statuses/7cc7aea24b865f11e74242555b175849dffa7702","head":{"label":"abdulhannanali:reporter-config","ref":"reporter-config","sha":"7cc7aea24b865f11e74242555b175849dffa7702","user":{"login":"abdulhannanali","id":8170969,"avatar_url":"https://avatars1.githubusercontent.com/u/8170969?v=3","gravatar_id":"","url":"https://api.github.com/users/abdulhannanali","html_url":"https://github.com/abdulhannanali","followers_url":"https://api.github.com/users/abdulhannanali/followers","following_url":"https://api.github.com/users/abdulhannanali/following{/other_user}","gists_url":"https://api.github.com/users/abdulhannanali/gists{/gist_id}","starred_url":"https://api.github.com/users/abdulhannanali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdulhannanali/subscriptions","organizations_url":"https://api.github.com/users/abdulhannanali/orgs","repos_url":"https://api.github.com/users/abdulhannanali/repos","events_url":"https://api.github.com/users/abdulhannanali/events{/privacy}","received_events_url":"https://api.github.com/users/abdulhannanali/received_events","type":"User","site_admin":false},"repo":{"id":83420642,"name":"jest","full_name":"abdulhannanali/jest","owner":{"login":"abdulhannanali","id":8170969,"avatar_url":"https://avatars1.githubusercontent.com/u/8170969?v=3","gravatar_id":"","url":"https://api.github.com/users/abdulhannanali","html_url":"https://github.com/abdulhannanali","followers_url":"https://api.github.com/users/abdulhannanali/followers","following_url":"https://api.github.com/users/abdulhannanali/following{/other_user}","gists_url":"https://api.github.com/users/abdulhannanali/gists{/gist_id}","starred_url":"https://api.github.com/users/abdulhannanali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdulhannanali/subscriptions","organizations_url":"https://api.github.com/users/abdulhannanali/orgs","repos_url":"https://api.github.com/users/abdulhannanali/repos","events_url":"https://api.github.com/users/abdulhannanali/events{/privacy}","received_events_url":"https://api.github.com/users/abdulhannanali/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abdulhannanali/jest","description":"🃏 Painless JavaScript Testing.","fork":true,"url":"https://api.github.com/repos/abdulhannanali/jest","forks_url":"https://api.github.com/repos/abdulhannanali/jest/forks","keys_url":"https://api.github.com/repos/abdulhannanali/jest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abdulhannanali/jest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abdulhannanali/jest/teams","hooks_url":"https://api.github.com/repos/abdulhannanali/jest/hooks","issue_events_url":"https://api.github.com/repos/abdulhannanali/jest/issues/events{/number}","events_url":"https://api.github.com/repos/abdulhannanali/jest/events","assignees_url":"https://api.github.com/repos/abdulhannanali/jest/assignees{/user}","branches_url":"https://api.github.com/repos/abdulhannanali/jest/branches{/branch}","tags_url":"https://api.github.com/repos/abdulhannanali/jest/tags","blobs_url":"https://api.github.com/repos/abdulhannanali/jest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abdulhannanali/jest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abdulhannanali/jest/git/refs{/sha}","trees_url":"https://api.github.com/repos/abdulhannanali/jest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abdulhannanali/jest/statuses/{sha}","languages_url":"https://api.github.com/repos/abdulhannanali/jest/languages","stargazers_url":"https://api.github.com/repos/abdulhannanali/jest/stargazers","contributors_url":"https://api.github.com/repos/abdulhannanali/jest/contributors","subscribers_url":"https://api.github.com/repos/abdulhannanali/jest/subscribers","subscription_url":"https://api.github.com/repos/abdulhannanali/jest/subscription","commits_url":"https://api.github.com/repos/abdulhannanali/jest/commits{/sha}","git_commits_url":"https://api.github.com/repos/abdulhannanali/jest/git/commits{/sha}","comments_url":"https://api.github.com/repos/abdulhannanali/jest/comments{/number}","issue_comment_url":"https://api.github.com/repos/abdulhannanali/jest/issues/comments{/number}","contents_url":"https://api.github.com/repos/abdulhannanali/jest/contents/{+path}","compare_url":"https://api.github.com/repos/abdulhannanali/jest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abdulhannanali/jest/merges","archive_url":"https://api.github.com/repos/abdulhannanali/jest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abdulhannanali/jest/downloads","issues_url":"https://api.github.com/repos/abdulhannanali/jest/issues{/number}","pulls_url":"https://api.github.com/repos/abdulhannanali/jest/pulls{/number}","milestones_url":"https://api.github.com/repos/abdulhannanali/jest/milestones{/number}","notifications_url":"https://api.github.com/repos/abdulhannanali/jest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abdulhannanali/jest/labels{/name}","releases_url":"https://api.github.com/repos/abdulhannanali/jest/releases{/id}","deployments_url":"https://api.github.com/repos/abdulhannanali/jest/deployments","created_at":"2017-02-28T10:39:32Z","updated_at":"2017-02-28T10:39:35Z","pushed_at":"2017-03-08T10:41:45Z","git_url":"git://github.com/abdulhannanali/jest.git","ssh_url":"git@github.com:abdulhannanali/jest.git","clone_url":"https://github.com/abdulhannanali/jest.git","svn_url":"https://github.com/abdulhannanali/jest","homepage":"http://facebook.github.io/jest/","size":13052,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":"facebook:master","ref":"master","sha":"5ab8e2826e335734795dbd3fcd4e2f1de993e2f4","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars0.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":15062869,"name":"jest","full_name":"facebook/jest","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars0.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/jest","description":"🃏 Painless JavaScript Testing.","fork":false,"url":"https://api.github.com/repos/facebook/jest","forks_url":"https://api.github.com/repos/facebook/jest/forks","keys_url":"https://api.github.com/repos/facebook/jest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/jest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/jest/teams","hooks_url":"https://api.github.com/repos/facebook/jest/hooks","issue_events_url":"https://api.github.com/repos/facebook/jest/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/jest/events","assignees_url":"https://api.github.com/repos/facebook/jest/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/jest/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/jest/tags","blobs_url":"https://api.github.com/repos/facebook/jest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/jest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/jest/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/jest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/jest/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/jest/languages","stargazers_url":"https://api.github.com/repos/facebook/jest/stargazers","contributors_url":"https://api.github.com/repos/facebook/jest/contributors","subscribers_url":"https://api.github.com/repos/facebook/jest/subscribers","subscription_url":"https://api.github.com/repos/facebook/jest/subscription","commits_url":"https://api.github.com/repos/facebook/jest/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/jest/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/jest/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/jest/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/jest/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/jest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/jest/merges","archive_url":"https://api.github.com/repos/facebook/jest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/jest/downloads","issues_url":"https://api.github.com/repos/facebook/jest/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/jest/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/jest/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/jest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/jest/labels{/name}","releases_url":"https://api.github.com/repos/facebook/jest/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/jest/deployments","created_at":"2013-12-10T00:18:04Z","updated_at":"2017-03-31T19:03:25Z","pushed_at":"2017-03-31T19:40:30Z","git_url":"git://github.com/facebook/jest.git","ssh_url":"git@github.com:facebook/jest.git","clone_url":"https://github.com/facebook/jest.git","svn_url":"https://github.com/facebook/jest","homepage":"http://facebook.github.io/jest/","size":13350,"stargazers_count":8963,"watchers_count":8963,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1100,"mirror_url":null,"open_issues_count":133,"forks":1100,"open_issues":133,"watchers":8963,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/jest/pulls/3064"},"html":{"href":"https://github.com/facebook/jest/pull/3064"},"issue":{"href":"https://api.github.com/repos/facebook/jest/issues/3064"},"comments":{"href":"https://api.github.com/repos/facebook/jest/issues/3064/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/jest/pulls/3064/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/jest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/jest/pulls/3064/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/jest/statuses/7cc7aea24b865f11e74242555b175849dffa7702"}}}}
{"actor":{"display_login":"abdulhannanali"}}