{"action":"opened","issue":{"url":"https://api.github.com/repos/TalAter/annyang/issues/142","labels_url":"https://api.github.com/repos/TalAter/annyang/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/TalAter/annyang/issues/142/comments","events_url":"https://api.github.com/repos/TalAter/annyang/issues/142/events","html_url":"https://github.com/TalAter/annyang/issues/142","id":127646383,"number":142,"title":":snowboarder: first-timers-only Add test spec for annyang.removeCommands() with named variables","user":{"login":"TalAter","id":926653,"avatar_url":"https://avatars.githubusercontent.com/u/926653?v=3","gravatar_id":"","url":"https://api.github.com/users/TalAter","html_url":"https://github.com/TalAter","followers_url":"https://api.github.com/users/TalAter/followers","following_url":"https://api.github.com/users/TalAter/following{/other_user}","gists_url":"https://api.github.com/users/TalAter/gists{/gist_id}","starred_url":"https://api.github.com/users/TalAter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TalAter/subscriptions","organizations_url":"https://api.github.com/users/TalAter/orgs","repos_url":"https://api.github.com/users/TalAter/repos","events_url":"https://api.github.com/users/TalAter/events{/privacy}","received_events_url":"https://api.github.com/users/TalAter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TalAter/annyang/labels/first-timers-only","name":"first-timers-only","color":"009800"},{"url":"https://api.github.com/repos/TalAter/annyang/labels/up-for-grabs","name":"up-for-grabs","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-20T10:05:23Z","updated_at":"2016-01-20T10:05:23Z","closed_at":null,"body":"#### first-timers-only\r\n\r\nThis issue is tagged **first-timers-only**. It is only for people who have never contributed to open source before, and are looking for an easy way take their first steps.\r\n\r\nThank you for your help :heart:\r\n\r\n#### The Issue\r\n\r\nThe test specs do not currently test for removing commands when they contain [named variables](https://github.com/TalAter/annyang/blob/master/docs/README.md#commands-object) (e.g. `annyang.removeCommand('You can\\'t take the :thing from me');`)\r\n\r\nThe tests described inside `describe(\"annyang.removeCommands\", function() {…});` in *test/spec/BasicSpec.js* include a number of tests for other uses of `removeCommands()`, and should be used as a template for your code.\r\n\r\nAdd a test spec that tests that the following code removes the correct command, and only the correct command: `annyang.removeCommand('You can\\'t take the :thing from me')`\r\n\r\n*It should be very similar to the test spec for `it('should remove a single command with an optional word when its name is passed as a string in the first parameter')`*\r\n\r\n#### Contributing to annyang\r\n\r\n- [x] Fork the repository from the [annyang GitHub page](https://github.com/TalAter/annyang).\r\n- [x] Clone a copy to your local machine with `$ git clone git@github.com:YOUR-GITHUB-USER-NAME/annyang.git`\r\n- [x] Make sure you have *node.js* and *npm* installed on your machine. You can use this [guide](https://docs.npmjs.com/getting-started/installing-node) for help.\r\n- [x] Install all of annyang's development dependencies with npm. `$ cd annyang; npm install`\r\n- [x] Run grunt to make sure everything runs smoothly `$ grunt`\r\n- [x] Code, code, code.\r\n- [x] Run `$ grunt` after making changes to verify that everything still works and run the build process. Alternatively, you can just run `$ grunt watch` once, and leave that process running. It will continuously run all the tests and build the files every time you make a change to one of annyang's files. It will even *beep* if you make an error, and help you debug it.:+1:\r\n- [x] Before committing your changes, the last step must always be running `$ grunt`. This makes sure everything works, and all files are kept up to date with your changes.\r\n- [x] Once you've made sure all your changes work correctly, and committed all your changes, push your local changes back to github with `$ git push -u origin master`\r\n- [x] Visit your fork on GitHub.com ([https://github.com/YOUR-USER-NAME/annyang](https://github.com/YOUR-USER-NAME/annyang)) and create a pull request for your changes.\r\n- [x] Makes sure your pull request describes exactly what you changed and references this issue (just include the issue number in the title like this: #49)\r\n\r\n#### About the tests\r\n\r\nannyang is tested using [Jasmine](http://jasmine.github.io/2.0/introduction.html).\r\n\r\nBasicSpec.js contains a series of spec groups (e.g. `describe('a spec group', function() {})`) which each contain 1 or more specs (e.g. `it('should do stuff', function() {})`). Some of the spec groups also contain some code which runs before each spec (`beforeEach(function() {})`).\r\n\r\nTo simulate Speech Recognition in the testing environment, annyang uses a mock object called [Corti](https://github.com/TalAter/Corti) which mocks the browser's SpeechRecognition object. Corti also adds a number of utility functions to the SpeechRecognition object which simulate user actions (e.g. `say('Hello there')`), and allow checking the SpeechRecognition's status (e.g. `isListening() === true`).\r\n"}}