{"action":"created","issue":{"url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/228","labels_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/228/comments","events_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/228/events","html_url":"https://github.com/unexpectedjs/unexpected/issues/228","id":116498747,"number":228,"title":"TestFrameworkPatch conflicts with blakeembrey/co-mocha","user":{"login":"simonratner","id":667283,"avatar_url":"https://avatars.githubusercontent.com/u/667283?v=3","gravatar_id":"","url":"https://api.github.com/users/simonratner","html_url":"https://github.com/simonratner","followers_url":"https://api.github.com/users/simonratner/followers","following_url":"https://api.github.com/users/simonratner/following{/other_user}","gists_url":"https://api.github.com/users/simonratner/gists{/gist_id}","starred_url":"https://api.github.com/users/simonratner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonratner/subscriptions","organizations_url":"https://api.github.com/users/simonratner/orgs","repos_url":"https://api.github.com/users/simonratner/repos","events_url":"https://api.github.com/users/simonratner/events{/privacy}","received_events_url":"https://api.github.com/users/simonratner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-12T07:58:55Z","updated_at":"2015-11-16T19:18:09Z","closed_at":null,"body":"TestFrameworkPatch wraps generator functions in a plain function wrapper, ~~making them impossible to use with co.wrap~~ preventing https://github.com/blakeembrey/co-mocha from identifying them as generators and automatically wrapping with `co.wrap`.\r\n\r\nFrom what I see, the patch hasn't been necessary for mocha since v1.18 as it has built-in support for async tests via returned promises. Is there a reason to still apply it?"},"comment":{"url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/comments/157141171","html_url":"https://github.com/unexpectedjs/unexpected/issues/228#issuecomment-157141171","issue_url":"https://api.github.com/repos/unexpectedjs/unexpected/issues/228","id":157141171,"user":{"login":"simonratner","id":667283,"avatar_url":"https://avatars.githubusercontent.com/u/667283?v=3","gravatar_id":"","url":"https://api.github.com/users/simonratner","html_url":"https://github.com/simonratner","followers_url":"https://api.github.com/users/simonratner/followers","following_url":"https://api.github.com/users/simonratner/following{/other_user}","gists_url":"https://api.github.com/users/simonratner/gists{/gist_id}","starred_url":"https://api.github.com/users/simonratner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonratner/subscriptions","organizations_url":"https://api.github.com/users/simonratner/orgs","repos_url":"https://api.github.com/users/simonratner/repos","events_url":"https://api.github.com/users/simonratner/events{/privacy}","received_events_url":"https://api.github.com/users/simonratner/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T19:18:09Z","updated_at":"2015-11-16T19:18:09Z","body":"Ha, I have certainly done that before, in actual code as well as tests :)\r\n\r\nFor now, I am working around the patch by setting `it.patchApplied = true` before including unexpected.js. An environment variable might be better. As far as interop with `co-mocha`, could make the patch smarter by detecting generator-based tests and wrapping them with a generator, so other code -- not just `co-mocha` -- would continue to work."}}