{"action":"created","issue":{"url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14195","repository_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp","labels_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14195/labels{/name}","comments_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14195/comments","events_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14195/events","html_url":"https://github.com/freeCodeCamp/freeCodeCamp/pull/14195","id":218718709,"number":14195,"title":"Add tests for mutate const array","user":{"login":"techstonia","id":7985185,"avatar_url":"https://avatars0.githubusercontent.com/u/7985185?v=3","gravatar_id":"","url":"https://api.github.com/users/techstonia","html_url":"https://github.com/techstonia","followers_url":"https://api.github.com/users/techstonia/followers","following_url":"https://api.github.com/users/techstonia/following{/other_user}","gists_url":"https://api.github.com/users/techstonia/gists{/gist_id}","starred_url":"https://api.github.com/users/techstonia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techstonia/subscriptions","organizations_url":"https://api.github.com/users/techstonia/orgs","repos_url":"https://api.github.com/users/techstonia/repos","events_url":"https://api.github.com/users/techstonia/events{/privacy}","received_events_url":"https://api.github.com/users/techstonia/received_events","type":"User","site_admin":false},"labels":[{"id":216482051,"url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/labels/blocked","name":"blocked","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-01T19:48:17Z","updated_at":"2017-04-06T16:01:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/pulls/14195","html_url":"https://github.com/freeCodeCamp/freeCodeCamp/pull/14195","diff_url":"https://github.com/freeCodeCamp/freeCodeCamp/pull/14195.diff","patch_url":"https://github.com/freeCodeCamp/freeCodeCamp/pull/14195.patch"},"body":"<!-- freeCodeCamp Pull Request Template -->\r\n\r\n<!-- IMPORTANT Please review https://github.com/freeCodeCamp/freeCodeCamp/blob/staging/CONTRIBUTING.md for detailed contributing guidelines -->\r\n<!-- Help with PRs can be found at https://gitter.im/FreeCodeCamp/Contributors -->\r\n<!-- Make sure that your PR is not a duplicate -->\r\n\r\n#### Pre-Submission Checklist\r\n<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply. -->\r\n<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->\r\n<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] Your pull request targets the `staging` branch of freeCodeCamp.\r\n- [x] Branch starts with either `fix/`, `feature/`, or `translate/` (e.g. `fix/signin-issue`)\r\n- [x] You have only one commit (if not, [squash](http://forum.freecodecamp.com/t/how-to-squash-multiple-commits-into-one-with-git/13231) them into one commit).\r\n- [x] All new and existing tests pass the command `npm test`. Use `git commit --amend` to amend any fixes.\r\n\r\n#### Type of Change\r\n<!-- What type of change does your code introduce? After creating the PR, tick the checkboxes that apply. -->\r\n- [x] Small bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds new functionality)\r\n- [ ] Breaking change (fix or feature that would change existing functionality)\r\n- [ ] Add new translation (feature adding new translations)\r\n\r\n#### Checklist:\r\n<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply. -->\r\n<!-- If you're unsure about any of these, don't hesitate to ask in the Help Contributors room linked above. We're here to help! -->\r\n- [x] Tested changes locally.\r\n- [ ] Closes currently open issue (replace XXXX with an issue no): Closes #XXXX\r\n\r\n#### Description\r\n<!-- Describe your changes in detail -->\r\n\r\nI added couple of tests for http://beta.freecodecamp.com/en/challenges/es6/mutate-an-array-declared-with-const. I actually wanted to add all the test and solve the #14118, but it turns out that checking whether variable is a constant or not is not very straightforward. That's probably because  console.log(code) reveals that s is a var and not a const.\r\n\r\nHope those two extra tests are still useful to merge. :)"},"comment":{"url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/comments/292221776","html_url":"https://github.com/freeCodeCamp/freeCodeCamp/pull/14195#issuecomment-292221776","issue_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14195","id":292221776,"user":{"login":"techstonia","id":7985185,"avatar_url":"https://avatars0.githubusercontent.com/u/7985185?v=3","gravatar_id":"","url":"https://api.github.com/users/techstonia","html_url":"https://github.com/techstonia","followers_url":"https://api.github.com/users/techstonia/followers","following_url":"https://api.github.com/users/techstonia/following{/other_user}","gists_url":"https://api.github.com/users/techstonia/gists{/gist_id}","starred_url":"https://api.github.com/users/techstonia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techstonia/subscriptions","organizations_url":"https://api.github.com/users/techstonia/orgs","repos_url":"https://api.github.com/users/techstonia/repos","events_url":"https://api.github.com/users/techstonia/events{/privacy}","received_events_url":"https://api.github.com/users/techstonia/received_events","type":"User","site_admin":false},"created_at":"2017-04-06T16:01:48Z","updated_at":"2017-04-06T16:01:48Z","body":"@dhcodes No problem. I tried to run it locally again. This code makes the tests pass:\r\n`\r\nconst s = [ 5, 7, 2 ];\r\n// change code below this line\r\n//s = [2, 5, 7];\r\ns[0] = 2;\r\ns[1] = 5;\r\ns[2] = 7;\r\n// change code above this line\r\n// Test your code\r\nconsole.log(s);\r\n`\r\n\r\nBut maybe you meant that the default code gives the error and it's not very descriptive to the user?\r\n\r\n<img width=\"683\" alt=\"screen shot 2017-04-06 at 18 30 14\" src=\"https://cloud.githubusercontent.com/assets/7985185/24762488/3781a948-1af7-11e7-8d4b-c6e3489887e5.png\">\r\n"}}
{"actor":{"display_login":"techstonia"}}