{"action":"created","issue":{"url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/62","repository_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha","labels_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/62/comments","events_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/62/events","html_url":"https://github.com/lo1tuma/eslint-plugin-mocha/issues/62","id":157682130,"number":62,"title":"rule to enforce returning promise in async tests instead of done","user":{"login":"zowers","id":604511,"avatar_url":"https://avatars.githubusercontent.com/u/604511?v=3","gravatar_id":"","url":"https://api.github.com/users/zowers","html_url":"https://github.com/zowers","followers_url":"https://api.github.com/users/zowers/followers","following_url":"https://api.github.com/users/zowers/following{/other_user}","gists_url":"https://api.github.com/users/zowers/gists{/gist_id}","starred_url":"https://api.github.com/users/zowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zowers/subscriptions","organizations_url":"https://api.github.com/users/zowers/orgs","repos_url":"https://api.github.com/users/zowers/repos","events_url":"https://api.github.com/users/zowers/events{/privacy}","received_events_url":"https://api.github.com/users/zowers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/labels/feature","name":"feature","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-05-31T14:14:00Z","updated_at":"2016-07-27T07:09:16Z","closed_at":null,"body":"don't know if it is possible to enforce usage of promise returns, probably not.\r\nat least it should be possible to check that `done` argument is not used and a `return something` is used instead"},"comment":{"url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/comments/235504535","html_url":"https://github.com/lo1tuma/eslint-plugin-mocha/issues/62#issuecomment-235504535","issue_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/62","id":235504535,"user":{"login":"jfmengels","id":3869412,"avatar_url":"https://avatars.githubusercontent.com/u/3869412?v=3","gravatar_id":"","url":"https://api.github.com/users/jfmengels","html_url":"https://github.com/jfmengels","followers_url":"https://api.github.com/users/jfmengels/followers","following_url":"https://api.github.com/users/jfmengels/following{/other_user}","gists_url":"https://api.github.com/users/jfmengels/gists{/gist_id}","starred_url":"https://api.github.com/users/jfmengels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfmengels/subscriptions","organizations_url":"https://api.github.com/users/jfmengels/orgs","repos_url":"https://api.github.com/users/jfmengels/repos","events_url":"https://api.github.com/users/jfmengels/events{/privacy}","received_events_url":"https://api.github.com/users/jfmengels/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T07:09:16Z","updated_at":"2016-07-27T07:09:16Z","body":"I mean, how do you write a test where you expect a Promise to be rejected.\r\n\r\n```js\r\nit('should reject when no arguments are passed', function(done) {\r\n  lib.foo()\r\n    .then(function() {\r\n      done(new Error('Expected error'));\r\n    })\r\n    .catch(function(error) {\r\n      assert.ok(error);\r\n      done();\r\n    });\r\n});\r\n```\r\n\r\nI have trouble writing tests like these withtout the `done` callback and without having the test pass when the promise is not rejected."}}
{"actor":{"display_login":"jfmengels"}}