{"action":"created","comment":{"url":"https://api.github.com/repos/chuotchet/redux/pulls/comments/225024053","pull_request_review_id":164532628,"id":225024053,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTAyNDA1Mw==","diff_hunk":"@@ -0,0 +1,51 @@\n+import React from 'react';\n+import AddTodo from './AddTodo';\n+import {shallow} from 'enzyme'\n+import configureStore from 'redux-mock-store';\n+\n+const setup = () => {\n+  const store = configureStore()({ todos: [] });\n+  const wrapper = shallow(<AddTodo store={store} />);\n+\n+  return {\n+    store,\n+    wrapper\n+  };\n+};\n+\n+describe('AddTodo',  () => {\n+  it('should match snapshot', () => {\n+    const { wrapper } = setup();\n+    expect(wrapper).toMatchSnapshot();\n+  })\n+\n+  describe('handleSubmit', () => {\n+    it('should prevent event default action', () => {\n+      let preventDefault = jest.fn();\n+      const { wrapper } = setup();\n+      let form = wrapper.shallow().find('form');\n+      form.simulate('submit', { preventDefault });\n+      expect(preventDefault).toHaveBeenCalled();\n+    })\n+\n+    it('should not do anything when value is empty', () => {\n+      let preventDefault = jest.fn();\n+      const { store, wrapper } = setup();\n+      const deeperWrapper = wrapper.shallow();\n+      deeperWrapper.find('input').simulate('change', { target: { value: '' } });\n+      deeperWrapper.shallow().find('form').simulate('submit', { preventDefault });\n+      expect(store.getActions()).toEqual([]);\n+    })","path":"examples/todos/src/containers/AddTodo.test.js","position":38,"original_position":38,"commit_id":"6d59bd619a10a2e12011b05c82faa2cdc73dab36","original_commit_id":"6d59bd619a10a2e12011b05c82faa2cdc73dab36","user":{"login":"chuotchet","id":15422540,"node_id":"MDQ6VXNlcjE1NDIyNTQw","avatar_url":"https://avatars1.githubusercontent.com/u/15422540?v=4","gravatar_id":"","url":"https://api.github.com/users/chuotchet","html_url":"https://github.com/chuotchet","followers_url":"https://api.github.com/users/chuotchet/followers","following_url":"https://api.github.com/users/chuotchet/following{/other_user}","gists_url":"https://api.github.com/users/chuotchet/gists{/gist_id}","starred_url":"https://api.github.com/users/chuotchet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuotchet/subscriptions","organizations_url":"https://api.github.com/users/chuotchet/orgs","repos_url":"https://api.github.com/users/chuotchet/repos","events_url":"https://api.github.com/users/chuotchet/events{/privacy}","received_events_url":"https://api.github.com/users/chuotchet/received_events","type":"User","site_admin":false},"body":"the case when value is present is under `should state value correctly`, isn't is? 😕 ","created_at":"2018-10-15T02:19:09Z","updated_at":"2018-10-15T02:19:10Z","html_url":"https://github.com/chuotchet/redux/pull/4#discussion_r225024053","pull_request_url":"https://api.github.com/repos/chuotchet/redux/pulls/4","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/chuotchet/redux/pulls/comments/225024053"},"html":{"href":"https://github.com/chuotchet/redux/pull/4#discussion_r225024053"},"pull_request":{"href":"https://api.github.com/repos/chuotchet/redux/pulls/4"}},"in_reply_to_id":225021568},"pull_request":{"url":"https://api.github.com/repos/chuotchet/redux/pulls/4","id":222422873,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNDIyODcz","html_url":"https://github.com/chuotchet/redux/pull/4","diff_url":"https://github.com/chuotchet/redux/pull/4.diff","patch_url":"https://github.com/chuotchet/redux/pull/4.patch","issue_url":"https://api.github.com/repos/chuotchet/redux/issues/4","number":4,"state":"open","locked":false,"title":"Add jest","user":{"login":"chuotchet","id":15422540,"node_id":"MDQ6VXNlcjE1NDIyNTQw","avatar_url":"https://avatars1.githubusercontent.com/u/15422540?v=4","gravatar_id":"","url":"https://api.github.com/users/chuotchet","html_url":"https://github.com/chuotchet","followers_url":"https://api.github.com/users/chuotchet/followers","following_url":"https://api.github.com/users/chuotchet/following{/other_user}","gists_url":"https://api.github.com/users/chuotchet/gists{/gist_id}","starred_url":"https://api.github.com/users/chuotchet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuotchet/subscriptions","organizations_url":"https://api.github.com/users/chuotchet/orgs","repos_url":"https://api.github.com/users/chuotchet/repos","events_url":"https://api.github.com/users/chuotchet/events{/privacy}","received_events_url":"https://api.github.com/users/chuotchet/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-12T10:34:14Z","updated_at":"2018-10-15T02:19:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25a475268df109a91d9ecb87a4a4183ca22bb524","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/chuotchet/redux/pulls/4/commits","review_comments_url":"https://api.github.com/repos/chuotchet/redux/pulls/4/comments","review_comment_url":"https://api.github.com/repos/chuotchet/redux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chuotchet/redux/issues/4/comments","statuses_url":"https://api.github.com/repos/chuotchet/redux/statuses/6d59bd619a10a2e12011b05c82faa2cdc73dab36","head":{"label":"chuotchet:add-jest","ref":"add-jest","sha":"6d59bd619a10a2e12011b05c82faa2cdc73dab36","user":{"login":"chuotchet","id":15422540,"node_id":"MDQ6VXNlcjE1NDIyNTQw","avatar_url":"https://avatars1.githubusercontent.com/u/15422540?v=4","gravatar_id":"","url":"https://api.github.com/users/chuotchet","html_url":"https://github.com/chuotchet","followers_url":"https://api.github.com/users/chuotchet/followers","following_url":"https://api.github.com/users/chuotchet/following{/other_user}","gists_url":"https://api.github.com/users/chuotchet/gists{/gist_id}","starred_url":"https://api.github.com/users/chuotchet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuotchet/subscriptions","organizations_url":"https://api.github.com/users/chuotchet/orgs","repos_url":"https://api.github.com/users/chuotchet/repos","events_url":"https://api.github.com/users/chuotchet/events{/privacy}","received_events_url":"https://api.github.com/users/chuotchet/received_events","type":"User","site_admin":false},"repo":{"id":152364691,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIzNjQ2OTE=","name":"redux","full_name":"chuotchet/redux","private":false,"owner":{"login":"chuotchet","id":15422540,"node_id":"MDQ6VXNlcjE1NDIyNTQw","avatar_url":"https://avatars1.githubusercontent.com/u/15422540?v=4","gravatar_id":"","url":"https://api.github.com/users/chuotchet","html_url":"https://github.com/chuotchet","followers_url":"https://api.github.com/users/chuotchet/followers","following_url":"https://api.github.com/users/chuotchet/following{/other_user}","gists_url":"https://api.github.com/users/chuotchet/gists{/gist_id}","starred_url":"https://api.github.com/users/chuotchet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuotchet/subscriptions","organizations_url":"https://api.github.com/users/chuotchet/orgs","repos_url":"https://api.github.com/users/chuotchet/repos","events_url":"https://api.github.com/users/chuotchet/events{/privacy}","received_events_url":"https://api.github.com/users/chuotchet/received_events","type":"User","site_admin":false},"html_url":"https://github.com/chuotchet/redux","description":"Predictable state container for JavaScript apps","fork":true,"url":"https://api.github.com/repos/chuotchet/redux","forks_url":"https://api.github.com/repos/chuotchet/redux/forks","keys_url":"https://api.github.com/repos/chuotchet/redux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chuotchet/redux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chuotchet/redux/teams","hooks_url":"https://api.github.com/repos/chuotchet/redux/hooks","issue_events_url":"https://api.github.com/repos/chuotchet/redux/issues/events{/number}","events_url":"https://api.github.com/repos/chuotchet/redux/events","assignees_url":"https://api.github.com/repos/chuotchet/redux/assignees{/user}","branches_url":"https://api.github.com/repos/chuotchet/redux/branches{/branch}","tags_url":"https://api.github.com/repos/chuotchet/redux/tags","blobs_url":"https://api.github.com/repos/chuotchet/redux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chuotchet/redux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chuotchet/redux/git/refs{/sha}","trees_url":"https://api.github.com/repos/chuotchet/redux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chuotchet/redux/statuses/{sha}","languages_url":"https://api.github.com/repos/chuotchet/redux/languages","stargazers_url":"https://api.github.com/repos/chuotchet/redux/stargazers","contributors_url":"https://api.github.com/repos/chuotchet/redux/contributors","subscribers_url":"https://api.github.com/repos/chuotchet/redux/subscribers","subscription_url":"https://api.github.com/repos/chuotchet/redux/subscription","commits_url":"https://api.github.com/repos/chuotchet/redux/commits{/sha}","git_commits_url":"https://api.github.com/repos/chuotchet/redux/git/commits{/sha}","comments_url":"https://api.github.com/repos/chuotchet/redux/comments{/number}","issue_comment_url":"https://api.github.com/repos/chuotchet/redux/issues/comments{/number}","contents_url":"https://api.github.com/repos/chuotchet/redux/contents/{+path}","compare_url":"https://api.github.com/repos/chuotchet/redux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chuotchet/redux/merges","archive_url":"https://api.github.com/repos/chuotchet/redux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chuotchet/redux/downloads","issues_url":"https://api.github.com/repos/chuotchet/redux/issues{/number}","pulls_url":"https://api.github.com/repos/chuotchet/redux/pulls{/number}","milestones_url":"https://api.github.com/repos/chuotchet/redux/milestones{/number}","notifications_url":"https://api.github.com/repos/chuotchet/redux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chuotchet/redux/labels{/name}","releases_url":"https://api.github.com/repos/chuotchet/redux/releases{/id}","deployments_url":"https://api.github.com/repos/chuotchet/redux/deployments","created_at":"2018-10-10T04:49:09Z","updated_at":"2018-10-11T10:11:29Z","pushed_at":"2018-10-14T09:45:17Z","git_url":"git://github.com/chuotchet/redux.git","ssh_url":"git@github.com:chuotchet/redux.git","clone_url":"https://github.com/chuotchet/redux.git","svn_url":"https://github.com/chuotchet/redux","homepage":"http://redux.js.org","size":7612,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"chuotchet:master","ref":"master","sha":"d7e25b879c2d8bc92ac0dffd86ebaef3c2569a28","user":{"login":"chuotchet","id":15422540,"node_id":"MDQ6VXNlcjE1NDIyNTQw","avatar_url":"https://avatars1.githubusercontent.com/u/15422540?v=4","gravatar_id":"","url":"https://api.github.com/users/chuotchet","html_url":"https://github.com/chuotchet","followers_url":"https://api.github.com/users/chuotchet/followers","following_url":"https://api.github.com/users/chuotchet/following{/other_user}","gists_url":"https://api.github.com/users/chuotchet/gists{/gist_id}","starred_url":"https://api.github.com/users/chuotchet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuotchet/subscriptions","organizations_url":"https://api.github.com/users/chuotchet/orgs","repos_url":"https://api.github.com/users/chuotchet/repos","events_url":"https://api.github.com/users/chuotchet/events{/privacy}","received_events_url":"https://api.github.com/users/chuotchet/received_events","type":"User","site_admin":false},"repo":{"id":152364691,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIzNjQ2OTE=","name":"redux","full_name":"chuotchet/redux","private":false,"owner":{"login":"chuotchet","id":15422540,"node_id":"MDQ6VXNlcjE1NDIyNTQw","avatar_url":"https://avatars1.githubusercontent.com/u/15422540?v=4","gravatar_id":"","url":"https://api.github.com/users/chuotchet","html_url":"https://github.com/chuotchet","followers_url":"https://api.github.com/users/chuotchet/followers","following_url":"https://api.github.com/users/chuotchet/following{/other_user}","gists_url":"https://api.github.com/users/chuotchet/gists{/gist_id}","starred_url":"https://api.github.com/users/chuotchet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuotchet/subscriptions","organizations_url":"https://api.github.com/users/chuotchet/orgs","repos_url":"https://api.github.com/users/chuotchet/repos","events_url":"https://api.github.com/users/chuotchet/events{/privacy}","received_events_url":"https://api.github.com/users/chuotchet/received_events","type":"User","site_admin":false},"html_url":"https://github.com/chuotchet/redux","description":"Predictable state container for JavaScript apps","fork":true,"url":"https://api.github.com/repos/chuotchet/redux","forks_url":"https://api.github.com/repos/chuotchet/redux/forks","keys_url":"https://api.github.com/repos/chuotchet/redux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chuotchet/redux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chuotchet/redux/teams","hooks_url":"https://api.github.com/repos/chuotchet/redux/hooks","issue_events_url":"https://api.github.com/repos/chuotchet/redux/issues/events{/number}","events_url":"https://api.github.com/repos/chuotchet/redux/events","assignees_url":"https://api.github.com/repos/chuotchet/redux/assignees{/user}","branches_url":"https://api.github.com/repos/chuotchet/redux/branches{/branch}","tags_url":"https://api.github.com/repos/chuotchet/redux/tags","blobs_url":"https://api.github.com/repos/chuotchet/redux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chuotchet/redux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chuotchet/redux/git/refs{/sha}","trees_url":"https://api.github.com/repos/chuotchet/redux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chuotchet/redux/statuses/{sha}","languages_url":"https://api.github.com/repos/chuotchet/redux/languages","stargazers_url":"https://api.github.com/repos/chuotchet/redux/stargazers","contributors_url":"https://api.github.com/repos/chuotchet/redux/contributors","subscribers_url":"https://api.github.com/repos/chuotchet/redux/subscribers","subscription_url":"https://api.github.com/repos/chuotchet/redux/subscription","commits_url":"https://api.github.com/repos/chuotchet/redux/commits{/sha}","git_commits_url":"https://api.github.com/repos/chuotchet/redux/git/commits{/sha}","comments_url":"https://api.github.com/repos/chuotchet/redux/comments{/number}","issue_comment_url":"https://api.github.com/repos/chuotchet/redux/issues/comments{/number}","contents_url":"https://api.github.com/repos/chuotchet/redux/contents/{+path}","compare_url":"https://api.github.com/repos/chuotchet/redux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chuotchet/redux/merges","archive_url":"https://api.github.com/repos/chuotchet/redux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chuotchet/redux/downloads","issues_url":"https://api.github.com/repos/chuotchet/redux/issues{/number}","pulls_url":"https://api.github.com/repos/chuotchet/redux/pulls{/number}","milestones_url":"https://api.github.com/repos/chuotchet/redux/milestones{/number}","notifications_url":"https://api.github.com/repos/chuotchet/redux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chuotchet/redux/labels{/name}","releases_url":"https://api.github.com/repos/chuotchet/redux/releases{/id}","deployments_url":"https://api.github.com/repos/chuotchet/redux/deployments","created_at":"2018-10-10T04:49:09Z","updated_at":"2018-10-11T10:11:29Z","pushed_at":"2018-10-14T09:45:17Z","git_url":"git://github.com/chuotchet/redux.git","ssh_url":"git@github.com:chuotchet/redux.git","clone_url":"https://github.com/chuotchet/redux.git","svn_url":"https://github.com/chuotchet/redux","homepage":"http://redux.js.org","size":7612,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chuotchet/redux/pulls/4"},"html":{"href":"https://github.com/chuotchet/redux/pull/4"},"issue":{"href":"https://api.github.com/repos/chuotchet/redux/issues/4"},"comments":{"href":"https://api.github.com/repos/chuotchet/redux/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/chuotchet/redux/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/chuotchet/redux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chuotchet/redux/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/chuotchet/redux/statuses/6d59bd619a10a2e12011b05c82faa2cdc73dab36"}},"author_association":"OWNER"}}
{"actor":{"display_login":"chuotchet"}}