{"action":"created","issue":{"url":"https://api.github.com/repos/TalAter/annyang/issues/168","repository_url":"https://api.github.com/repos/TalAter/annyang","labels_url":"https://api.github.com/repos/TalAter/annyang/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/TalAter/annyang/issues/168/comments","events_url":"https://api.github.com/repos/TalAter/annyang/issues/168/events","html_url":"https://github.com/TalAter/annyang/issues/168","id":133046011,"number":168,"title":"first-timers-only: Add test to make sure resultNoMatch callbacks returns possible sentences","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":1,"created_at":"2016-02-11T18:13:38Z","updated_at":"2016-02-11T20:14:23Z","closed_at":null,"body":"#### first-timers-only\r\n\r\nThis issue is tagged :octocat: **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#### Background\r\n\r\nCallbacks added using `annyang.addCallback('resultMatch', aFunction)` will be called when a sentence a user said does match any of the currently registered commands (see [docs](https://github.com/TalAter/annyang/tree/master/docs#addcallbacktype-callback-context)).\r\n\r\nThe callback function should be called with an array of the possible sentences the user may have said as the first argument.\r\n\r\n#### The Issue\r\n\r\nThe test specs do not currently test to verify that the callback function is called with the possible sentences the user may have said\r\n\r\nAdd a test spec that verify this spec:\r\n````javascript\r\n  it('should call the callback with the the first argument containing an array of all possible Speech Recognition Alternatives the user may have said', func1);\r\n}\r\n````\r\nThis should be added into the following test suite:\r\n````javascript\r\ndescribe(\"annyang.addCallback('resultNoMatch')\", function() {\r\n````\r\n\r\nThe last test described inside `describe(\"annyang.addCallback('resultMatch')\", function() {…});` in *test/spec/BasicSpec.js*, can be used as a template for adding the new spec described above.\r\n\r\n#### Contributing to annyang\r\n\r\n- [ ] Fork the repository from the [annyang GitHub page](https://github.com/TalAter/annyang).\r\n- [ ] Clone a copy to your local machine with `$ git clone git@github.com:YOUR-GITHUB-USER-NAME/annyang.git`\r\n- [ ] 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- [ ] Install all of annyang's development dependencies with npm. `$ cd annyang; npm install`\r\n- [ ] Run grunt to make sure everything runs smoothly `$ grunt`\r\n- [ ] Code, code, code.\r\n- [ ] 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- [ ] 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- [ ] 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- [ ] 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- [ ] 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"},"comment":{"url":"https://api.github.com/repos/TalAter/annyang/issues/comments/183045530","html_url":"https://github.com/TalAter/annyang/issues/168#issuecomment-183045530","issue_url":"https://api.github.com/repos/TalAter/annyang/issues/168","id":183045530,"user":{"login":"timotius02","id":5110237,"avatar_url":"https://avatars.githubusercontent.com/u/5110237?v=3","gravatar_id":"","url":"https://api.github.com/users/timotius02","html_url":"https://github.com/timotius02","followers_url":"https://api.github.com/users/timotius02/followers","following_url":"https://api.github.com/users/timotius02/following{/other_user}","gists_url":"https://api.github.com/users/timotius02/gists{/gist_id}","starred_url":"https://api.github.com/users/timotius02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timotius02/subscriptions","organizations_url":"https://api.github.com/users/timotius02/orgs","repos_url":"https://api.github.com/users/timotius02/repos","events_url":"https://api.github.com/users/timotius02/events{/privacy}","received_events_url":"https://api.github.com/users/timotius02/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T20:14:23Z","updated_at":"2016-02-11T20:14:23Z","body":"Trying to tackle this issue now. I'm just wondering why annyang is adding the words \"and so on\" for each possible sentence. "}}