{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/comments/170217301","pull_request_review_id":98869670,"id":170217301,"diff_hunk":"@@ -0,0 +1,89 @@\n+# ModernJS - Jest\n+## Welcome to Modern JS\n+\n+## Jest\n+In this lesson we'll be learning about [Jest](https://facebook.github.io/jest) which is an easy and powerful tool for testing your javascript projects.\n+\n+### What is Jest?\n+It is a unit testing framework, creating with the idea of being a \"zero configuration\" testing experience.\n+We'll spend less time setting up test runners, assertion libraries, mocking tools and more time writing tests, leading to more stable and healthy code bases. \n+\n+### Features\n+- Automatically generating snapshots for snapshot testing\n+- Running tests in parallel, meaning it's super performant\n+- Sandboxing tests and automatically tearing down global state so you don't have to worry about conflicts\n+- Code coverage reports\n+- Built-in mocking and assertions\n+\n+## Installing Jest\n+Jest is available on npm.\n+\n+```\n+// yarn\n+yarn add --dev jest\n+\n+// npm\n+npm i --save-dev jest\n+```\n+\n+### Using Jest with babel\n+Jest runs on Node and as a result, if you're using ES2016+ you'll need to transpile your code. A nice side effect of this is that we can also write our tests in ES2016+ too.","path":"lessons/jest.md","position":30,"original_position":30,"commit_id":"c7dc7a68f21b476c73e46ec58fc45f56d481dd1c","original_commit_id":"c7dc7a68f21b476c73e46ec58fc45f56d481dd1c","user":{"login":"RichieAHB","id":1652187,"avatar_url":"https://avatars3.githubusercontent.com/u/1652187?v=4","gravatar_id":"","url":"https://api.github.com/users/RichieAHB","html_url":"https://github.com/RichieAHB","followers_url":"https://api.github.com/users/RichieAHB/followers","following_url":"https://api.github.com/users/RichieAHB/following{/other_user}","gists_url":"https://api.github.com/users/RichieAHB/gists{/gist_id}","starred_url":"https://api.github.com/users/RichieAHB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichieAHB/subscriptions","organizations_url":"https://api.github.com/users/RichieAHB/orgs","repos_url":"https://api.github.com/users/RichieAHB/repos","events_url":"https://api.github.com/users/RichieAHB/events{/privacy}","received_events_url":"https://api.github.com/users/RichieAHB/received_events","type":"User","site_admin":false},"body":"Maybe worth mentioning that if you're happy *without* ES modules you can sidestep using Babel if you're using a late Node version as it'll support most, if not all, of the stage-4 stuff. Only if people look intimidated by the babel / jest wiring 😨 ","created_at":"2018-02-23T10:31:31Z","updated_at":"2018-02-23T11:01:59Z","html_url":"https://github.com/guardian/modern-js-workshop/pull/12#discussion_r170217301","pull_request_url":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/12","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/comments/170217301"},"html":{"href":"https://github.com/guardian/modern-js-workshop/pull/12#discussion_r170217301"},"pull_request":{"href":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/12","id":170509569,"html_url":"https://github.com/guardian/modern-js-workshop/pull/12","diff_url":"https://github.com/guardian/modern-js-workshop/pull/12.diff","patch_url":"https://github.com/guardian/modern-js-workshop/pull/12.patch","issue_url":"https://api.github.com/repos/guardian/modern-js-workshop/issues/12","number":12,"state":"open","locked":false,"title":"First pass at jest docs","user":{"login":"shaundillon","id":2104095,"avatar_url":"https://avatars2.githubusercontent.com/u/2104095?v=4","gravatar_id":"","url":"https://api.github.com/users/shaundillon","html_url":"https://github.com/shaundillon","followers_url":"https://api.github.com/users/shaundillon/followers","following_url":"https://api.github.com/users/shaundillon/following{/other_user}","gists_url":"https://api.github.com/users/shaundillon/gists{/gist_id}","starred_url":"https://api.github.com/users/shaundillon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaundillon/subscriptions","organizations_url":"https://api.github.com/users/shaundillon/orgs","repos_url":"https://api.github.com/users/shaundillon/repos","events_url":"https://api.github.com/users/shaundillon/events{/privacy}","received_events_url":"https://api.github.com/users/shaundillon/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-21T15:51:23Z","updated_at":"2018-02-23T11:01:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bf4319dc90163616ff583359e8e0d4e8ccf1e4f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"svillafe","id":825398,"avatar_url":"https://avatars1.githubusercontent.com/u/825398?v=4","gravatar_id":"","url":"https://api.github.com/users/svillafe","html_url":"https://github.com/svillafe","followers_url":"https://api.github.com/users/svillafe/followers","following_url":"https://api.github.com/users/svillafe/following{/other_user}","gists_url":"https://api.github.com/users/svillafe/gists{/gist_id}","starred_url":"https://api.github.com/users/svillafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svillafe/subscriptions","organizations_url":"https://api.github.com/users/svillafe/orgs","repos_url":"https://api.github.com/users/svillafe/repos","events_url":"https://api.github.com/users/svillafe/events{/privacy}","received_events_url":"https://api.github.com/users/svillafe/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/12/commits","review_comments_url":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/12/comments","review_comment_url":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/modern-js-workshop/issues/12/comments","statuses_url":"https://api.github.com/repos/guardian/modern-js-workshop/statuses/c7dc7a68f21b476c73e46ec58fc45f56d481dd1c","head":{"label":"guardian:jest-docs","ref":"jest-docs","sha":"c7dc7a68f21b476c73e46ec58fc45f56d481dd1c","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":113178492,"name":"modern-js-workshop","full_name":"guardian/modern-js-workshop","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/modern-js-workshop","description":"Modern Js course","fork":false,"url":"https://api.github.com/repos/guardian/modern-js-workshop","forks_url":"https://api.github.com/repos/guardian/modern-js-workshop/forks","keys_url":"https://api.github.com/repos/guardian/modern-js-workshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/modern-js-workshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/modern-js-workshop/teams","hooks_url":"https://api.github.com/repos/guardian/modern-js-workshop/hooks","issue_events_url":"https://api.github.com/repos/guardian/modern-js-workshop/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/modern-js-workshop/events","assignees_url":"https://api.github.com/repos/guardian/modern-js-workshop/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/modern-js-workshop/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/modern-js-workshop/tags","blobs_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/modern-js-workshop/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/modern-js-workshop/languages","stargazers_url":"https://api.github.com/repos/guardian/modern-js-workshop/stargazers","contributors_url":"https://api.github.com/repos/guardian/modern-js-workshop/contributors","subscribers_url":"https://api.github.com/repos/guardian/modern-js-workshop/subscribers","subscription_url":"https://api.github.com/repos/guardian/modern-js-workshop/subscription","commits_url":"https://api.github.com/repos/guardian/modern-js-workshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/modern-js-workshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/modern-js-workshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/modern-js-workshop/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/modern-js-workshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/modern-js-workshop/merges","archive_url":"https://api.github.com/repos/guardian/modern-js-workshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/modern-js-workshop/downloads","issues_url":"https://api.github.com/repos/guardian/modern-js-workshop/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/modern-js-workshop/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/modern-js-workshop/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/modern-js-workshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/modern-js-workshop/labels{/name}","releases_url":"https://api.github.com/repos/guardian/modern-js-workshop/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/modern-js-workshop/deployments","created_at":"2017-12-05T12:20:07Z","updated_at":"2018-02-12T12:07:26Z","pushed_at":"2018-02-23T08:43:13Z","git_url":"git://github.com/guardian/modern-js-workshop.git","ssh_url":"git@github.com:guardian/modern-js-workshop.git","clone_url":"https://github.com/guardian/modern-js-workshop.git","svn_url":"https://github.com/guardian/modern-js-workshop","homepage":"","size":65,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"77a2711754b97fdf6e3eece2fd8ee818ad00260c","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":113178492,"name":"modern-js-workshop","full_name":"guardian/modern-js-workshop","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/modern-js-workshop","description":"Modern Js course","fork":false,"url":"https://api.github.com/repos/guardian/modern-js-workshop","forks_url":"https://api.github.com/repos/guardian/modern-js-workshop/forks","keys_url":"https://api.github.com/repos/guardian/modern-js-workshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/modern-js-workshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/modern-js-workshop/teams","hooks_url":"https://api.github.com/repos/guardian/modern-js-workshop/hooks","issue_events_url":"https://api.github.com/repos/guardian/modern-js-workshop/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/modern-js-workshop/events","assignees_url":"https://api.github.com/repos/guardian/modern-js-workshop/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/modern-js-workshop/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/modern-js-workshop/tags","blobs_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/modern-js-workshop/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/modern-js-workshop/languages","stargazers_url":"https://api.github.com/repos/guardian/modern-js-workshop/stargazers","contributors_url":"https://api.github.com/repos/guardian/modern-js-workshop/contributors","subscribers_url":"https://api.github.com/repos/guardian/modern-js-workshop/subscribers","subscription_url":"https://api.github.com/repos/guardian/modern-js-workshop/subscription","commits_url":"https://api.github.com/repos/guardian/modern-js-workshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/modern-js-workshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/modern-js-workshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/modern-js-workshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/modern-js-workshop/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/modern-js-workshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/modern-js-workshop/merges","archive_url":"https://api.github.com/repos/guardian/modern-js-workshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/modern-js-workshop/downloads","issues_url":"https://api.github.com/repos/guardian/modern-js-workshop/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/modern-js-workshop/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/modern-js-workshop/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/modern-js-workshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/modern-js-workshop/labels{/name}","releases_url":"https://api.github.com/repos/guardian/modern-js-workshop/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/modern-js-workshop/deployments","created_at":"2017-12-05T12:20:07Z","updated_at":"2018-02-12T12:07:26Z","pushed_at":"2018-02-23T08:43:13Z","git_url":"git://github.com/guardian/modern-js-workshop.git","ssh_url":"git@github.com:guardian/modern-js-workshop.git","clone_url":"https://github.com/guardian/modern-js-workshop.git","svn_url":"https://github.com/guardian/modern-js-workshop","homepage":"","size":65,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/12"},"html":{"href":"https://github.com/guardian/modern-js-workshop/pull/12"},"issue":{"href":"https://api.github.com/repos/guardian/modern-js-workshop/issues/12"},"comments":{"href":"https://api.github.com/repos/guardian/modern-js-workshop/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/modern-js-workshop/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/modern-js-workshop/statuses/c7dc7a68f21b476c73e46ec58fc45f56d481dd1c"}},"author_association":"NONE"}}
{"actor":{"display_login":"RichieAHB"}}