{"action":"created","issue":{"url":"https://api.github.com/repos/koajs/koa/issues/703","repository_url":"https://api.github.com/repos/koajs/koa","labels_url":"https://api.github.com/repos/koajs/koa/issues/703/labels{/name}","comments_url":"https://api.github.com/repos/koajs/koa/issues/703/comments","events_url":"https://api.github.com/repos/koajs/koa/issues/703/events","html_url":"https://github.com/koajs/koa/issues/703","id":145571080,"number":703,"title":"Switch to a new testing system","user":{"login":"PlasmaPower","id":6006498,"avatar_url":"https://avatars.githubusercontent.com/u/6006498?v=3","gravatar_id":"","url":"https://api.github.com/users/PlasmaPower","html_url":"https://github.com/PlasmaPower","followers_url":"https://api.github.com/users/PlasmaPower/followers","following_url":"https://api.github.com/users/PlasmaPower/following{/other_user}","gists_url":"https://api.github.com/users/PlasmaPower/gists{/gist_id}","starred_url":"https://api.github.com/users/PlasmaPower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PlasmaPower/subscriptions","organizations_url":"https://api.github.com/users/PlasmaPower/orgs","repos_url":"https://api.github.com/users/PlasmaPower/repos","events_url":"https://api.github.com/users/PlasmaPower/events{/privacy}","received_events_url":"https://api.github.com/users/PlasmaPower/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/koajs/koa/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/koajs/koa/labels/tests","name":"tests","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-04T03:03:01Z","updated_at":"2016-04-04T15:47:12Z","closed_at":null,"body":"Frameworks:\r\n\r\n| Framework        | Simultaneous Testing | Multiple Processes For Multiple Files | Global Error Handling | Builtin Babel | NPM Downloads/Month |\r\n|-----------------------|:--:|:---:|:---:|:--:|:--:|\r\n| Mocha (current) |     |     | ✓ |     | ![NPM Downloads/Month](https://img.shields.io/npm/dm/mocha.svg?style=flat-square) |\r\n| Ava                    | ✓ | ✓ |     | ✓ | ![NPM Downloads/Month](https://img.shields.io/npm/dm/ava.svg?style=flat-square) |\r\n\r\nRequest Libraries:\r\n\r\n| Request Library | Uses Promises | Builtin Response Testing | Response Testing Covers Common Use Cases | Reasonable Defaults For Testing | NPM Downloads/Month |\r\n|---------------------------------|:---:|:--:|:--:|:--:|:--:|\r\n| Superagent                    |     |     |    | ✓ | ![NPM Downloads/Month](https://img.shields.io/npm/dm/superagent.svg?style=flat-square) |\r\n| Supertest (current)         |     | ✓  |    | ✓ | ![NPM Downloads/Month](https://img.shields.io/npm/dm/supertest.svg?style=flat-square) |\r\n| Supertest-As-Promised | ✓ | ✓  |    | ✓ | ![NPM Downloads/Month](https://img.shields.io/npm/dm/supertest-as-promised.svg?style=flat-square) |\r\n| Assert-Request              | ✓ | ✓ | ✓ | ✓ | ![NPM Downloads/Month](https://img.shields.io/npm/dm/assert-request.svg?style=flat-square) |\r\n| Request                         |    |      |     |  ✓ | ![NPM Downloads/Month](https://img.shields.io/npm/dm/request.svg?style=flat-square) |\r\n| Request-Promise           | ✓ |      |     |     | ![NPM Downloads/Month](https://img.shields.io/npm/dm/request-promise.svg?style=flat-square) |\r\n| Node-Fetch                    | ✓ |      |     | ✓ | ![NPM Downloads/Month](https://img.shields.io/npm/dm/node-fetch.svg?style=flat-square) |\r\n\r\nNotes:\r\n- `(current)` indicates that Koa currently uses it.\r\n- If we use a framework with builtin babel support, we can easily use async/await in place of builtin response testing if the library supports promises.\r\n- If a request library doesn't have reasonable defaults, we can easily create a wrapper that does.\r\n\r\nIf anybody has any more columns or rows to add to either table, please leave a comment."},"comment":{"url":"https://api.github.com/repos/koajs/koa/issues/comments/205360109","html_url":"https://github.com/koajs/koa/issues/703#issuecomment-205360109","issue_url":"https://api.github.com/repos/koajs/koa/issues/703","id":205360109,"user":{"login":"PlasmaPower","id":6006498,"avatar_url":"https://avatars.githubusercontent.com/u/6006498?v=3","gravatar_id":"","url":"https://api.github.com/users/PlasmaPower","html_url":"https://github.com/PlasmaPower","followers_url":"https://api.github.com/users/PlasmaPower/followers","following_url":"https://api.github.com/users/PlasmaPower/following{/other_user}","gists_url":"https://api.github.com/users/PlasmaPower/gists{/gist_id}","starred_url":"https://api.github.com/users/PlasmaPower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PlasmaPower/subscriptions","organizations_url":"https://api.github.com/users/PlasmaPower/orgs","repos_url":"https://api.github.com/users/PlasmaPower/repos","events_url":"https://api.github.com/users/PlasmaPower/events{/privacy}","received_events_url":"https://api.github.com/users/PlasmaPower/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T15:47:11Z","updated_at":"2016-04-04T15:47:11Z","body":"> what sucks about current tests?\r\n\r\nFor one thing, [you can't easily detect that there isn't a header](https://github.com/koajs/koa/blob/master/test/context/onerror.js#L48) (that's the lack of \"Response Testing Covers Common Use Cases\"). Also in rare situations it would be useful to have a .then to assert something set elsewhere rather than a custom end method. Another thing is that as tests grow speed matters more, and with how split up tests are multiple processes for multiple files will be very important. Lastly, if we do switch our request library to something without builtin request testing, having async/await will be very nice (builtin babel will be required as that isn't in the near future for node)."}}