{"action":"created","issue":{"url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/187","labels_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/187/comments","events_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/187/events","html_url":"https://github.com/unexpectedjs/unexpected/issues/187","id":92919030,"number":187,"title":"expect: Always return a thenable","user":{"login":"papandreou","id":373545,"avatar_url":"https://avatars.githubusercontent.com/u/373545?v=3","gravatar_id":"","url":"https://api.github.com/users/papandreou","html_url":"https://github.com/papandreou","followers_url":"https://api.github.com/users/papandreou/followers","following_url":"https://api.github.com/users/papandreou/following{/other_user}","gists_url":"https://api.github.com/users/papandreou/gists{/gist_id}","starred_url":"https://api.github.com/users/papandreou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/papandreou/subscriptions","organizations_url":"https://api.github.com/users/papandreou/orgs","repos_url":"https://api.github.com/users/papandreou/repos","events_url":"https://api.github.com/users/papandreou/events{/privacy}","received_events_url":"https://api.github.com/users/papandreou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-07-03T18:20:50Z","updated_at":"2015-07-06T18:22:14Z","closed_at":null,"body":"@sunesimonsen and I discussed this recently. For consistency it would be nice to always return a promise, even for synchronous/oathbroken assertions. Should be as simple as `return Promise.resolve(returnValueOfAssertion)` in the code path where a non-promise return value is detected. That will allow synchronous assertions to return something meaningful, like how `to call the callback` fulfills the promise with the arguments passed to the callback.\r\n\r\nFor bonus points we could mount an `and` method that's a shorthand for running another `expect` with the same subject, similar to `expect.it`:\r\n\r\n```js\r\nreturn expect(123, 'to be a number').and('to be greater than', 99);\r\n```\r\n\r\n... Of course with the caveat that the subsequent assertions won't be evaluated or mentioned in the error report if the first one fails.\r\n\r\nHopefully the perf penalty won't be too big."},"comment":{"url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/comments/118945433","html_url":"https://github.com/unexpectedjs/unexpected/issues/187#issuecomment-118945433","issue_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/187","id":118945433,"user":{"login":"sunesimonsen","id":90802,"avatar_url":"https://avatars.githubusercontent.com/u/90802?v=3","gravatar_id":"","url":"https://api.github.com/users/sunesimonsen","html_url":"https://github.com/sunesimonsen","followers_url":"https://api.github.com/users/sunesimonsen/followers","following_url":"https://api.github.com/users/sunesimonsen/following{/other_user}","gists_url":"https://api.github.com/users/sunesimonsen/gists{/gist_id}","starred_url":"https://api.github.com/users/sunesimonsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunesimonsen/subscriptions","organizations_url":"https://api.github.com/users/sunesimonsen/orgs","repos_url":"https://api.github.com/users/sunesimonsen/repos","events_url":"https://api.github.com/users/sunesimonsen/events{/privacy}","received_events_url":"https://api.github.com/users/sunesimonsen/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T18:22:14Z","updated_at":"2015-07-06T18:22:14Z","body":"It would be a pretty nice feature."}}