{"action":"created","comment":{"url":"https://api.github.com/repos/NYTimes/kyt/pulls/comments/79452540","id":79452540,"diff_hunk":"@@ -15,29 +15,46 @@ and export an object with the following options.\n  4. `debug` - when true, the CLI returns all verbose output *default*: false\n  5. `productionPublicPath` - the public path for assets in the production build. Useful for CDN's *default*: `/assets/`\n  6. `reactHotLoader` - Turns on React Hot Loading *default*: false\n- 7. `modifyWebpackConfig` - Callback function for editing kyt's Webpack configs. See more details below\n+ 7. `modifyWebpackConfig` - Callback function for editing kyt's Webpack configs. [See more details below](#modifyWebpackConfig).\n+ 8. `modifyJestConfig` - Callback function for editing kyt's Jest config. [See more details below](#modifyJestConfig).\n \n \n-## ModifyWebpackConfig\n-modifyWebpackConfig is an optional callback you can define to edit the Webpack config for each part of development.\n+## modifyWebpackConfig\n+`modifyWebpackConfig` is an optional callback you can define to edit the Webpack config for each part of development.\n This allows you to add new babel-plugins, modify Webpack loaders, etc.\n \n The function is called with two parameters:\n-1. `baseConfig` The base Webpack config used in the process\n+1. `baseConfig` The base Webpack config used in the process.\n 2. `options` an object of useful options including the webpackConfig type, ports, and paths. The options object includes an environment and type so you can make changes based on a particular development task.\n \n Define the function in your `kyt.config.js` and it will be called as each Webpack file loads.\n \n ```javascript\n-  modifyWebpackConfig: (config, options) => {\n-    // modify config based on the options\n-    return config;\n-  }\n+modifyWebpackConfig: (baseConfig, options) => {\n+  // modify baseConfig based on the options\n+  return baseConfig;\n+}\n ```\n \n Dev Tip:\n [webpack-merge](https://github.com/survivejs/webpack-merge) is a helpful tool for changing and combining Webpack configs.\n \n+## modifyJestConfig\n+`modifyJestConfig` is an optional callback you can define to edit the Jest config for your tests.\n+\n+The function is called with one parameter:\n+1. `baseConfig` The base Jest config that will be used.\n+\n+There are no options passed in (like how `modifyWebpackConfig` has) since the only option would be a \"test\" environment, which would be redundant.\n+\n+```javascript\n+modifyJestConfig: (baseConfig) => {\n+  // modify baseConfig as needed\n+  return baseConfig;\n+}\n+```\n+\n+> **NOTE:** Currently the base Jest config runs `modifyWebpackConfig()` for you with `options.environment = \"development\"` in order to grab the development settings for your app (babel plugins, aliases, etc). For most cases, this will be sufficient configuration to get your tests working out of the box without a need to define `modifyJestConfig` yourself. So it is recommended that you try running the tests through first and only add this callback if it's needed. If you try it out and this assumption doesn't seem to work for your use case, please file an issue.","path":"docs/kytConfig.md","position":null,"original_position":51,"commit_id":"f9ba18f0677de87ccc8c52bd9c257f865e8aca6f","original_commit_id":"371dd58dc23949a2da3f959c34eb862d6fd9ffff","user":{"login":"ccpricenytimes","id":4968097,"avatar_url":"https://avatars.githubusercontent.com/u/4968097?v=3","gravatar_id":"","url":"https://api.github.com/users/ccpricenytimes","html_url":"https://github.com/ccpricenytimes","followers_url":"https://api.github.com/users/ccpricenytimes/followers","following_url":"https://api.github.com/users/ccpricenytimes/following{/other_user}","gists_url":"https://api.github.com/users/ccpricenytimes/gists{/gist_id}","starred_url":"https://api.github.com/users/ccpricenytimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccpricenytimes/subscriptions","organizations_url":"https://api.github.com/users/ccpricenytimes/orgs","repos_url":"https://api.github.com/users/ccpricenytimes/repos","events_url":"https://api.github.com/users/ccpricenytimes/events{/privacy}","received_events_url":"https://api.github.com/users/ccpricenytimes/received_events","type":"User","site_admin":false},"body":"I think what's there now is good. thanks","created_at":"2016-09-19T18:05:49Z","updated_at":"2016-09-19T18:05:49Z","html_url":"https://github.com/NYTimes/kyt/pull/115#discussion_r79452540","pull_request_url":"https://api.github.com/repos/NYTimes/kyt/pulls/115","_links":{"self":{"href":"https://api.github.com/repos/NYTimes/kyt/pulls/comments/79452540"},"html":{"href":"https://github.com/NYTimes/kyt/pull/115#discussion_r79452540"},"pull_request":{"href":"https://api.github.com/repos/NYTimes/kyt/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/NYTimes/kyt/pulls/115","id":84709815,"html_url":"https://github.com/NYTimes/kyt/pull/115","diff_url":"https://github.com/NYTimes/kyt/pull/115.diff","patch_url":"https://github.com/NYTimes/kyt/pull/115.patch","issue_url":"https://api.github.com/repos/NYTimes/kyt/issues/115","number":115,"state":"open","locked":false,"title":"Jest","user":{"login":"tizmagik","id":244704,"avatar_url":"https://avatars.githubusercontent.com/u/244704?v=3","gravatar_id":"","url":"https://api.github.com/users/tizmagik","html_url":"https://github.com/tizmagik","followers_url":"https://api.github.com/users/tizmagik/followers","following_url":"https://api.github.com/users/tizmagik/following{/other_user}","gists_url":"https://api.github.com/users/tizmagik/gists{/gist_id}","starred_url":"https://api.github.com/users/tizmagik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tizmagik/subscriptions","organizations_url":"https://api.github.com/users/tizmagik/orgs","repos_url":"https://api.github.com/users/tizmagik/repos","events_url":"https://api.github.com/users/tizmagik/events{/privacy}","received_events_url":"https://api.github.com/users/tizmagik/received_events","type":"User","site_admin":false},"body":"Uses [Jest](https://facebook.github.io/jest/) as a test runner, instead of AVA.\r\n\r\nJest supports in-memory transpiling of source and test files (via Babel) which removes the expensive step of transpiling to disk and thus significantly speeds up test runtime. It also comes with some very impressive features such as a changed-only watch mode, [snapshot testing](https://facebook.github.io/jest/blog/2016/07/27/jest-14.html), and out of the box code coverage reporting.\r\n\r\n#### AVA Runtime\r\n![image](https://cloud.githubusercontent.com/assets/244704/18400998/5213e60e-76a6-11e6-9e44-a3719d875836.png)\r\n\r\n#### Jest runtime at \"cold boot\"\r\n![image](https://cloud.githubusercontent.com/assets/244704/18400801/76febb3e-76a5-11e6-91e5-f2f025e8a05c.png)\r\n\r\n#### Jest runtime in \"watch\" mode\r\n![image](https://cloud.githubusercontent.com/assets/244704/18400837/9b17f5bc-76a5-11e6-98c2-d679766b3b84.png)\r\n\r\n_There's an extra test for Jest because I added a dummy test to get the harness working._\r\n\r\n---\r\n\r\nStill todo:\r\n\r\n- [x] ~~Potentially refactor how babel config integrates with userland. Right now, this code reuses `modifyWebpackConfig()` to grab the appropriate \"development\" babel config.~~ To be done in #134 \r\n- [x] Remove AVA and clean up other artifacts\r\n- [x] Add `--watch` support in the kyt CLI (Jest supports this out of the box)\r\n- [x] Add `--coverage` support\r\n- [x] Documentation\r\n\r\n\r\n","created_at":"2016-09-09T20:00:59Z","updated_at":"2016-09-19T18:05:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73c9d66fd3164db841b7ae3e8c689d7d0f421e2a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NYTimes/kyt/pulls/115/commits","review_comments_url":"https://api.github.com/repos/NYTimes/kyt/pulls/115/comments","review_comment_url":"https://api.github.com/repos/NYTimes/kyt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NYTimes/kyt/issues/115/comments","statuses_url":"https://api.github.com/repos/NYTimes/kyt/statuses/f9ba18f0677de87ccc8c52bd9c257f865e8aca6f","head":{"label":"NYTimes:feature/jest","ref":"feature/jest","sha":"f9ba18f0677de87ccc8c52bd9c257f865e8aca6f","user":{"login":"NYTimes","id":221409,"avatar_url":"https://avatars.githubusercontent.com/u/221409?v=3","gravatar_id":"","url":"https://api.github.com/users/NYTimes","html_url":"https://github.com/NYTimes","followers_url":"https://api.github.com/users/NYTimes/followers","following_url":"https://api.github.com/users/NYTimes/following{/other_user}","gists_url":"https://api.github.com/users/NYTimes/gists{/gist_id}","starred_url":"https://api.github.com/users/NYTimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYTimes/subscriptions","organizations_url":"https://api.github.com/users/NYTimes/orgs","repos_url":"https://api.github.com/users/NYTimes/repos","events_url":"https://api.github.com/users/NYTimes/events{/privacy}","received_events_url":"https://api.github.com/users/NYTimes/received_events","type":"Organization","site_admin":false},"repo":{"id":60372006,"name":"kyt","full_name":"NYTimes/kyt","owner":{"login":"NYTimes","id":221409,"avatar_url":"https://avatars.githubusercontent.com/u/221409?v=3","gravatar_id":"","url":"https://api.github.com/users/NYTimes","html_url":"https://github.com/NYTimes","followers_url":"https://api.github.com/users/NYTimes/followers","following_url":"https://api.github.com/users/NYTimes/following{/other_user}","gists_url":"https://api.github.com/users/NYTimes/gists{/gist_id}","starred_url":"https://api.github.com/users/NYTimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYTimes/subscriptions","organizations_url":"https://api.github.com/users/NYTimes/orgs","repos_url":"https://api.github.com/users/NYTimes/repos","events_url":"https://api.github.com/users/NYTimes/events{/privacy}","received_events_url":"https://api.github.com/users/NYTimes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYTimes/kyt","description":"A toolkit that encapsulates and manages the configuration for web apps. Read more about it:","fork":false,"url":"https://api.github.com/repos/NYTimes/kyt","forks_url":"https://api.github.com/repos/NYTimes/kyt/forks","keys_url":"https://api.github.com/repos/NYTimes/kyt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYTimes/kyt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYTimes/kyt/teams","hooks_url":"https://api.github.com/repos/NYTimes/kyt/hooks","issue_events_url":"https://api.github.com/repos/NYTimes/kyt/issues/events{/number}","events_url":"https://api.github.com/repos/NYTimes/kyt/events","assignees_url":"https://api.github.com/repos/NYTimes/kyt/assignees{/user}","branches_url":"https://api.github.com/repos/NYTimes/kyt/branches{/branch}","tags_url":"https://api.github.com/repos/NYTimes/kyt/tags","blobs_url":"https://api.github.com/repos/NYTimes/kyt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYTimes/kyt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYTimes/kyt/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYTimes/kyt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYTimes/kyt/statuses/{sha}","languages_url":"https://api.github.com/repos/NYTimes/kyt/languages","stargazers_url":"https://api.github.com/repos/NYTimes/kyt/stargazers","contributors_url":"https://api.github.com/repos/NYTimes/kyt/contributors","subscribers_url":"https://api.github.com/repos/NYTimes/kyt/subscribers","subscription_url":"https://api.github.com/repos/NYTimes/kyt/subscription","commits_url":"https://api.github.com/repos/NYTimes/kyt/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYTimes/kyt/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYTimes/kyt/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYTimes/kyt/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYTimes/kyt/contents/{+path}","compare_url":"https://api.github.com/repos/NYTimes/kyt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYTimes/kyt/merges","archive_url":"https://api.github.com/repos/NYTimes/kyt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYTimes/kyt/downloads","issues_url":"https://api.github.com/repos/NYTimes/kyt/issues{/number}","pulls_url":"https://api.github.com/repos/NYTimes/kyt/pulls{/number}","milestones_url":"https://api.github.com/repos/NYTimes/kyt/milestones{/number}","notifications_url":"https://api.github.com/repos/NYTimes/kyt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYTimes/kyt/labels{/name}","releases_url":"https://api.github.com/repos/NYTimes/kyt/releases{/id}","deployments_url":"https://api.github.com/repos/NYTimes/kyt/deployments","created_at":"2016-06-03T19:16:26Z","updated_at":"2016-09-19T17:39:19Z","pushed_at":"2016-09-19T16:14:24Z","git_url":"git://github.com/NYTimes/kyt.git","ssh_url":"git@github.com:NYTimes/kyt.git","clone_url":"https://github.com/NYTimes/kyt.git","svn_url":"https://github.com/NYTimes/kyt","homepage":"http://open.blogs.nytimes.com/2016/09/13/introducing-kyt-our-web-app-configuration-toolkit/","size":833,"stargazers_count":286,"watchers_count":286,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":24,"forks":3,"open_issues":24,"watchers":286,"default_branch":"master"}},"base":{"label":"NYTimes:master","ref":"master","sha":"2d72505e89f5abd04357aa7c758894f9f8f4cef2","user":{"login":"NYTimes","id":221409,"avatar_url":"https://avatars.githubusercontent.com/u/221409?v=3","gravatar_id":"","url":"https://api.github.com/users/NYTimes","html_url":"https://github.com/NYTimes","followers_url":"https://api.github.com/users/NYTimes/followers","following_url":"https://api.github.com/users/NYTimes/following{/other_user}","gists_url":"https://api.github.com/users/NYTimes/gists{/gist_id}","starred_url":"https://api.github.com/users/NYTimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYTimes/subscriptions","organizations_url":"https://api.github.com/users/NYTimes/orgs","repos_url":"https://api.github.com/users/NYTimes/repos","events_url":"https://api.github.com/users/NYTimes/events{/privacy}","received_events_url":"https://api.github.com/users/NYTimes/received_events","type":"Organization","site_admin":false},"repo":{"id":60372006,"name":"kyt","full_name":"NYTimes/kyt","owner":{"login":"NYTimes","id":221409,"avatar_url":"https://avatars.githubusercontent.com/u/221409?v=3","gravatar_id":"","url":"https://api.github.com/users/NYTimes","html_url":"https://github.com/NYTimes","followers_url":"https://api.github.com/users/NYTimes/followers","following_url":"https://api.github.com/users/NYTimes/following{/other_user}","gists_url":"https://api.github.com/users/NYTimes/gists{/gist_id}","starred_url":"https://api.github.com/users/NYTimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYTimes/subscriptions","organizations_url":"https://api.github.com/users/NYTimes/orgs","repos_url":"https://api.github.com/users/NYTimes/repos","events_url":"https://api.github.com/users/NYTimes/events{/privacy}","received_events_url":"https://api.github.com/users/NYTimes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYTimes/kyt","description":"A toolkit that encapsulates and manages the configuration for web apps. Read more about it:","fork":false,"url":"https://api.github.com/repos/NYTimes/kyt","forks_url":"https://api.github.com/repos/NYTimes/kyt/forks","keys_url":"https://api.github.com/repos/NYTimes/kyt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYTimes/kyt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYTimes/kyt/teams","hooks_url":"https://api.github.com/repos/NYTimes/kyt/hooks","issue_events_url":"https://api.github.com/repos/NYTimes/kyt/issues/events{/number}","events_url":"https://api.github.com/repos/NYTimes/kyt/events","assignees_url":"https://api.github.com/repos/NYTimes/kyt/assignees{/user}","branches_url":"https://api.github.com/repos/NYTimes/kyt/branches{/branch}","tags_url":"https://api.github.com/repos/NYTimes/kyt/tags","blobs_url":"https://api.github.com/repos/NYTimes/kyt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYTimes/kyt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYTimes/kyt/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYTimes/kyt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYTimes/kyt/statuses/{sha}","languages_url":"https://api.github.com/repos/NYTimes/kyt/languages","stargazers_url":"https://api.github.com/repos/NYTimes/kyt/stargazers","contributors_url":"https://api.github.com/repos/NYTimes/kyt/contributors","subscribers_url":"https://api.github.com/repos/NYTimes/kyt/subscribers","subscription_url":"https://api.github.com/repos/NYTimes/kyt/subscription","commits_url":"https://api.github.com/repos/NYTimes/kyt/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYTimes/kyt/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYTimes/kyt/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYTimes/kyt/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYTimes/kyt/contents/{+path}","compare_url":"https://api.github.com/repos/NYTimes/kyt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYTimes/kyt/merges","archive_url":"https://api.github.com/repos/NYTimes/kyt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYTimes/kyt/downloads","issues_url":"https://api.github.com/repos/NYTimes/kyt/issues{/number}","pulls_url":"https://api.github.com/repos/NYTimes/kyt/pulls{/number}","milestones_url":"https://api.github.com/repos/NYTimes/kyt/milestones{/number}","notifications_url":"https://api.github.com/repos/NYTimes/kyt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYTimes/kyt/labels{/name}","releases_url":"https://api.github.com/repos/NYTimes/kyt/releases{/id}","deployments_url":"https://api.github.com/repos/NYTimes/kyt/deployments","created_at":"2016-06-03T19:16:26Z","updated_at":"2016-09-19T17:39:19Z","pushed_at":"2016-09-19T16:14:24Z","git_url":"git://github.com/NYTimes/kyt.git","ssh_url":"git@github.com:NYTimes/kyt.git","clone_url":"https://github.com/NYTimes/kyt.git","svn_url":"https://github.com/NYTimes/kyt","homepage":"http://open.blogs.nytimes.com/2016/09/13/introducing-kyt-our-web-app-configuration-toolkit/","size":833,"stargazers_count":286,"watchers_count":286,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":24,"forks":3,"open_issues":24,"watchers":286,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NYTimes/kyt/pulls/115"},"html":{"href":"https://github.com/NYTimes/kyt/pull/115"},"issue":{"href":"https://api.github.com/repos/NYTimes/kyt/issues/115"},"comments":{"href":"https://api.github.com/repos/NYTimes/kyt/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/NYTimes/kyt/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/NYTimes/kyt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NYTimes/kyt/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/NYTimes/kyt/statuses/f9ba18f0677de87ccc8c52bd9c257f865e8aca6f"}}}}
{"actor":{"display_login":"ccpricenytimes"}}