{"action":"opened","issue":{"url":"https://api.github.com/repos/atom-community/autocomplete-plus/issues/417","labels_url":"https://api.github.com/repos/atom-community/autocomplete-plus/issues/417/labels{/name}","comments_url":"https://api.github.com/repos/atom-community/autocomplete-plus/issues/417/comments","events_url":"https://api.github.com/repos/atom-community/autocomplete-plus/issues/417/events","html_url":"https://github.com/atom-community/autocomplete-plus/issues/417","id":71312727,"number":417,"title":"Provide Guidance For Provider Authors Writing Test","user":{"login":"joefitzgerald","id":744740,"avatar_url":"https://avatars.githubusercontent.com/u/744740?v=3","gravatar_id":"","url":"https://api.github.com/users/joefitzgerald","html_url":"https://github.com/joefitzgerald","followers_url":"https://api.github.com/users/joefitzgerald/followers","following_url":"https://api.github.com/users/joefitzgerald/following{/other_user}","gists_url":"https://api.github.com/users/joefitzgerald/gists{/gist_id}","starred_url":"https://api.github.com/users/joefitzgerald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joefitzgerald/subscriptions","organizations_url":"https://api.github.com/users/joefitzgerald/orgs","repos_url":"https://api.github.com/users/joefitzgerald/repos","events_url":"https://api.github.com/users/joefitzgerald/events{/privacy}","received_events_url":"https://api.github.com/users/joefitzgerald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-27T15:11:55Z","updated_at":"2015-04-27T15:11:55Z","closed_at":null,"body":"I think we should provide docs :abc: for provider authors to guide them in writing tests for their providers. These tests need to be able to verify a few things:\r\n\r\n- [ ] Typing a character triggers a suggestion request\r\n- [ ] The provider is called when their selector matches\r\n- [ ] The provider is not called when their selector does not match\r\n- [ ] [Suggestions](https://github.com/atom-community/autocomplete-plus/wiki/Provider-API#suggestions) are provided when appropriate\r\n- [ ] [Suggestions](https://github.com/atom-community/autocomplete-plus/wiki/Provider-API#suggestions) are not provided when appropriate\r\n- [ ] [Suggestions](https://github.com/atom-community/autocomplete-plus/wiki/Provider-API#suggestions) conform to the autocomplete-plus API definition for suggestions\r\n- [ ] [Suggestions](https://github.com/atom-community/autocomplete-plus/wiki/Provider-API#suggestions) are confirmed correctly\r\n- [ ] The `onDidInsertSuggestion` function (if specified) is called correctly\r\n\r\nFurther complicating things is that tests:\r\n\r\n* Must be asynchronous and leverage `waitsFor`\r\n* Usually need to be integration tests to fully test the desired functionality\r\n\r\nClear and up-to-date documentation for writing testable providers will be invaluable to new provider authors and ensure that the Provider ecosystem continues to expand with good quality, well tested providers."}}