{"action":"created","comment":{"url":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/comments/220284401","pull_request_review_id":158657433,"id":220284401,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDI4NDQwMQ==","diff_hunk":"@@ -0,0 +1,36 @@\n+import React, { Component } from 'react';\n+import { connect } from 'react-redux';\n+\n+import actionCreators from '../../../redux/simpleCalculator/actions';\n+\n+import SimpleCalculator from './layout';\n+\n+class SimpleCalculatorContainer extends Component {\n+  render() {\n+    return (\n+      <SimpleCalculator\n+        calculatorValue={this.props.calculatorValue}\n+        onAdd={this.props.add}\n+        onSubstract={this.props.substract}\n+      />\n+    );\n+  }\n+}\n+\n+const mapStateToProps = state => ({\n+  calculatorValue: state.calculatorValue\n+});\n+\n+const mapDispatchToProps = dispatch => ({\n+  add: () => {\n+    dispatch(actionCreators.add());\n+  },\n+  substract: () => {","path":"react/testing_3/src/app/components/SimpleCalculator/index.js","position":28,"original_position":28,"commit_id":"c6a6276240a89c97619066cb6b3734ade9c10cf3","original_commit_id":"2c1ff9d3b81d32be4d6d326ca14bffadac1ab23c","user":{"login":"HarryPerez","id":36163179,"node_id":"MDQ6VXNlcjM2MTYzMTc5","avatar_url":"https://avatars1.githubusercontent.com/u/36163179?v=4","gravatar_id":"","url":"https://api.github.com/users/HarryPerez","html_url":"https://github.com/HarryPerez","followers_url":"https://api.github.com/users/HarryPerez/followers","following_url":"https://api.github.com/users/HarryPerez/following{/other_user}","gists_url":"https://api.github.com/users/HarryPerez/gists{/gist_id}","starred_url":"https://api.github.com/users/HarryPerez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarryPerez/subscriptions","organizations_url":"https://api.github.com/users/HarryPerez/orgs","repos_url":"https://api.github.com/users/HarryPerez/repos","events_url":"https://api.github.com/users/HarryPerez/events{/privacy}","received_events_url":"https://api.github.com/users/HarryPerez/received_events","type":"User","site_admin":false},"body":"I think i can use it here, in order to bind both actions to `dispatch` directly. With this we are binding our actions with our `store` instance. Now which is the real justification for this?. Because the use of `bindActionCreators` is `when you want to pass some action creators down to a component that isn't aware of Redux`.  But here we are just passing our methods `add and substract` to our `SimpleCalculator/layout.js`.\r\nThe justification is `i don't want to pass dispatch or the store` ? or `It is better in order to avoid unnecessary declarations in the mapDispatchToProps` (In the case that we don't have any extra logic when we have to dispatch any action).\r\n\r\nWhat do you think?  😄 \r\n","created_at":"2018-09-25T17:29:26Z","updated_at":"2018-09-25T17:29:26Z","html_url":"https://github.com/wolox-training/finger-exercises/pull/6#discussion_r220284401","pull_request_url":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/6","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/comments/220284401"},"html":{"href":"https://github.com/wolox-training/finger-exercises/pull/6#discussion_r220284401"},"pull_request":{"href":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/6"}},"in_reply_to_id":220193891},"pull_request":{"url":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/6","id":217762174,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NzYyMTc0","html_url":"https://github.com/wolox-training/finger-exercises/pull/6","diff_url":"https://github.com/wolox-training/finger-exercises/pull/6.diff","patch_url":"https://github.com/wolox-training/finger-exercises/pull/6.patch","issue_url":"https://api.github.com/repos/wolox-training/finger-exercises/issues/6","number":6,"state":"open","locked":false,"title":"[React] Testing III","user":{"login":"HarryPerez","id":36163179,"node_id":"MDQ6VXNlcjM2MTYzMTc5","avatar_url":"https://avatars1.githubusercontent.com/u/36163179?v=4","gravatar_id":"","url":"https://api.github.com/users/HarryPerez","html_url":"https://github.com/HarryPerez","followers_url":"https://api.github.com/users/HarryPerez/followers","following_url":"https://api.github.com/users/HarryPerez/following{/other_user}","gists_url":"https://api.github.com/users/HarryPerez/gists{/gist_id}","starred_url":"https://api.github.com/users/HarryPerez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarryPerez/subscriptions","organizations_url":"https://api.github.com/users/HarryPerez/orgs","repos_url":"https://api.github.com/users/HarryPerez/repos","events_url":"https://api.github.com/users/HarryPerez/events{/privacy}","received_events_url":"https://api.github.com/users/HarryPerez/received_events","type":"User","site_admin":false},"body":"## Summary\r\nCreated an simple calculator app with `CRA` with redux in order to apply `Jest and Enzyme to test actions and reducers`. \r\n\r\n#### Features: \r\n* Actions test\r\n* Reducer test\r\n* Integration test with real store\r\n* Integration test with mocked store\r\n\r\n## Important (read)\r\n#### I will let you see in this pr how to solve all tests. In the end when it is ok i will delete all solutions.\r\n\r\n## Trello Card\r\nhttps://trello.com/c/th4HnHzb/20-card-testing-iii","created_at":"2018-09-24T19:26:35Z","updated_at":"2018-09-25T17:29:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70b73a984d3858e28feb33ab2da0be9fee0c19f6","assignee":{"login":"WFolini","id":12822259,"node_id":"MDQ6VXNlcjEyODIyMjU5","avatar_url":"https://avatars2.githubusercontent.com/u/12822259?v=4","gravatar_id":"","url":"https://api.github.com/users/WFolini","html_url":"https://github.com/WFolini","followers_url":"https://api.github.com/users/WFolini/followers","following_url":"https://api.github.com/users/WFolini/following{/other_user}","gists_url":"https://api.github.com/users/WFolini/gists{/gist_id}","starred_url":"https://api.github.com/users/WFolini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WFolini/subscriptions","organizations_url":"https://api.github.com/users/WFolini/orgs","repos_url":"https://api.github.com/users/WFolini/repos","events_url":"https://api.github.com/users/WFolini/events{/privacy}","received_events_url":"https://api.github.com/users/WFolini/received_events","type":"User","site_admin":false},"assignees":[{"login":"WFolini","id":12822259,"node_id":"MDQ6VXNlcjEyODIyMjU5","avatar_url":"https://avatars2.githubusercontent.com/u/12822259?v=4","gravatar_id":"","url":"https://api.github.com/users/WFolini","html_url":"https://github.com/WFolini","followers_url":"https://api.github.com/users/WFolini/followers","following_url":"https://api.github.com/users/WFolini/following{/other_user}","gists_url":"https://api.github.com/users/WFolini/gists{/gist_id}","starred_url":"https://api.github.com/users/WFolini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WFolini/subscriptions","organizations_url":"https://api.github.com/users/WFolini/orgs","repos_url":"https://api.github.com/users/WFolini/repos","events_url":"https://api.github.com/users/WFolini/events{/privacy}","received_events_url":"https://api.github.com/users/WFolini/received_events","type":"User","site_admin":false},{"login":"HarryPerez","id":36163179,"node_id":"MDQ6VXNlcjM2MTYzMTc5","avatar_url":"https://avatars1.githubusercontent.com/u/36163179?v=4","gravatar_id":"","url":"https://api.github.com/users/HarryPerez","html_url":"https://github.com/HarryPerez","followers_url":"https://api.github.com/users/HarryPerez/followers","following_url":"https://api.github.com/users/HarryPerez/following{/other_user}","gists_url":"https://api.github.com/users/HarryPerez/gists{/gist_id}","starred_url":"https://api.github.com/users/HarryPerez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarryPerez/subscriptions","organizations_url":"https://api.github.com/users/HarryPerez/orgs","repos_url":"https://api.github.com/users/HarryPerez/repos","events_url":"https://api.github.com/users/HarryPerez/events{/privacy}","received_events_url":"https://api.github.com/users/HarryPerez/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"WFolini","id":12822259,"node_id":"MDQ6VXNlcjEyODIyMjU5","avatar_url":"https://avatars2.githubusercontent.com/u/12822259?v=4","gravatar_id":"","url":"https://api.github.com/users/WFolini","html_url":"https://github.com/WFolini","followers_url":"https://api.github.com/users/WFolini/followers","following_url":"https://api.github.com/users/WFolini/following{/other_user}","gists_url":"https://api.github.com/users/WFolini/gists{/gist_id}","starred_url":"https://api.github.com/users/WFolini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WFolini/subscriptions","organizations_url":"https://api.github.com/users/WFolini/orgs","repos_url":"https://api.github.com/users/WFolini/repos","events_url":"https://api.github.com/users/WFolini/events{/privacy}","received_events_url":"https://api.github.com/users/WFolini/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":876329769,"node_id":"MDU6TGFiZWw4NzYzMjk3Njk=","url":"https://api.github.com/repos/wolox-training/finger-exercises/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/6/commits","review_comments_url":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/6/comments","review_comment_url":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wolox-training/finger-exercises/issues/6/comments","statuses_url":"https://api.github.com/repos/wolox-training/finger-exercises/statuses/c6a6276240a89c97619066cb6b3734ade9c10cf3","head":{"label":"wolox-training:react-fe-testing-III","ref":"react-fe-testing-III","sha":"c6a6276240a89c97619066cb6b3734ade9c10cf3","user":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":126372688,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYzNzI2ODg=","name":"finger-exercises","full_name":"wolox-training/finger-exercises","private":false,"owner":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wolox-training/finger-exercises","description":"Finger exercises that complements trainings.","fork":false,"url":"https://api.github.com/repos/wolox-training/finger-exercises","forks_url":"https://api.github.com/repos/wolox-training/finger-exercises/forks","keys_url":"https://api.github.com/repos/wolox-training/finger-exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/finger-exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/finger-exercises/teams","hooks_url":"https://api.github.com/repos/wolox-training/finger-exercises/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/finger-exercises/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/finger-exercises/events","assignees_url":"https://api.github.com/repos/wolox-training/finger-exercises/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/finger-exercises/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/finger-exercises/tags","blobs_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/finger-exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/finger-exercises/languages","stargazers_url":"https://api.github.com/repos/wolox-training/finger-exercises/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/finger-exercises/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/finger-exercises/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/finger-exercises/subscription","commits_url":"https://api.github.com/repos/wolox-training/finger-exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/finger-exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/finger-exercises/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/finger-exercises/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/finger-exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/finger-exercises/merges","archive_url":"https://api.github.com/repos/wolox-training/finger-exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/finger-exercises/downloads","issues_url":"https://api.github.com/repos/wolox-training/finger-exercises/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/finger-exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/finger-exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/finger-exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/finger-exercises/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/finger-exercises/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/finger-exercises/deployments","created_at":"2018-03-22T17:34:55Z","updated_at":"2018-03-22T17:34:57Z","pushed_at":"2018-09-25T16:16:24Z","git_url":"git://github.com/wolox-training/finger-exercises.git","ssh_url":"git@github.com:wolox-training/finger-exercises.git","clone_url":"https://github.com/wolox-training/finger-exercises.git","svn_url":"https://github.com/wolox-training/finger-exercises","homepage":null,"size":323,"stargazers_count":0,"watchers_count":0,"language":null,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"wolox-training:react","ref":"react","sha":"c3b4ac11f864db151e24cb02fa2c4d988d02a8fb","user":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":126372688,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYzNzI2ODg=","name":"finger-exercises","full_name":"wolox-training/finger-exercises","private":false,"owner":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wolox-training/finger-exercises","description":"Finger exercises that complements trainings.","fork":false,"url":"https://api.github.com/repos/wolox-training/finger-exercises","forks_url":"https://api.github.com/repos/wolox-training/finger-exercises/forks","keys_url":"https://api.github.com/repos/wolox-training/finger-exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/finger-exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/finger-exercises/teams","hooks_url":"https://api.github.com/repos/wolox-training/finger-exercises/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/finger-exercises/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/finger-exercises/events","assignees_url":"https://api.github.com/repos/wolox-training/finger-exercises/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/finger-exercises/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/finger-exercises/tags","blobs_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/finger-exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/finger-exercises/languages","stargazers_url":"https://api.github.com/repos/wolox-training/finger-exercises/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/finger-exercises/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/finger-exercises/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/finger-exercises/subscription","commits_url":"https://api.github.com/repos/wolox-training/finger-exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/finger-exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/finger-exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/finger-exercises/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/finger-exercises/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/finger-exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/finger-exercises/merges","archive_url":"https://api.github.com/repos/wolox-training/finger-exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/finger-exercises/downloads","issues_url":"https://api.github.com/repos/wolox-training/finger-exercises/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/finger-exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/finger-exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/finger-exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/finger-exercises/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/finger-exercises/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/finger-exercises/deployments","created_at":"2018-03-22T17:34:55Z","updated_at":"2018-03-22T17:34:57Z","pushed_at":"2018-09-25T16:16:24Z","git_url":"git://github.com/wolox-training/finger-exercises.git","ssh_url":"git@github.com:wolox-training/finger-exercises.git","clone_url":"https://github.com/wolox-training/finger-exercises.git","svn_url":"https://github.com/wolox-training/finger-exercises","homepage":null,"size":323,"stargazers_count":0,"watchers_count":0,"language":null,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/6"},"html":{"href":"https://github.com/wolox-training/finger-exercises/pull/6"},"issue":{"href":"https://api.github.com/repos/wolox-training/finger-exercises/issues/6"},"comments":{"href":"https://api.github.com/repos/wolox-training/finger-exercises/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wolox-training/finger-exercises/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/wolox-training/finger-exercises/statuses/c6a6276240a89c97619066cb6b3734ade9c10cf3"}},"author_association":"NONE"}}
{"actor":{"display_login":"HarryPerez"}}