{"action":"created","issue":{"url":"https://api.github.com/repos/fastify/fastify/issues/1688","repository_url":"https://api.github.com/repos/fastify/fastify","labels_url":"https://api.github.com/repos/fastify/fastify/issues/1688/labels{/name}","comments_url":"https://api.github.com/repos/fastify/fastify/issues/1688/comments","events_url":"https://api.github.com/repos/fastify/fastify/issues/1688/events","html_url":"https://github.com/fastify/fastify/issues/1688","id":451189284,"node_id":"MDU6SXNzdWU0NTExODkyODQ=","number":1688,"title":"May I contribute to testing (specific features are listed below)?","user":{"login":"i0natan","id":8571500,"node_id":"MDQ6VXNlcjg1NzE1MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/8571500?v=4","gravatar_id":"","url":"https://api.github.com/users/i0natan","html_url":"https://github.com/i0natan","followers_url":"https://api.github.com/users/i0natan/followers","following_url":"https://api.github.com/users/i0natan/following{/other_user}","gists_url":"https://api.github.com/users/i0natan/gists{/gist_id}","starred_url":"https://api.github.com/users/i0natan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i0natan/subscriptions","organizations_url":"https://api.github.com/users/i0natan/orgs","repos_url":"https://api.github.com/users/i0natan/repos","events_url":"https://api.github.com/users/i0natan/events{/privacy}","received_events_url":"https://api.github.com/users/i0natan/received_events","type":"User","site_admin":false},"labels":[{"id":964745695,"node_id":"MDU6TGFiZWw5NjQ3NDU2OTU=","url":"https://api.github.com/repos/fastify/fastify/labels/stale","name":"stale","color":"f9f9f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2019-06-02T12:57:03Z","updated_at":"2019-06-18T19:33:26Z","closed_at":null,"author_association":"NONE","body":"Before you submit an issue we recommend you drop into the [Gitter community](https://gitter.im/fastify) or [Fastify Help](https://github.com/fastify/help) and ask any questions you have or mention any problems you've had getting started with Fastify.\r\n\r\n**Please read this entire template before posting any issue. If you ignore these instructions\r\nand post an issue here that does not follow the instructions, your issue might be closed,\r\nlocked, and assigned the `missing discussion` label.**\r\n\r\n## 🚀 Feature Proposal\r\n\r\nA clear and concise description of what the feature is.\r\n\r\n:clap: Howdy and thanks for the great work, I started to use Fastify and enjoy it!\r\n\r\nI aim to specialize at writing good tests, it's along road but I'm trying :), I also write about it from time to time ([example blog 1](https://medium.com/@me_37286/yoni-goldberg-javascript-nodejs-testing-best-practices-2b98924c9347), [example content 2](https://github.com/i0natan/nodebestpractices) ) and I thought that maybe I can contribute useful enhancements to the already great testing here. I'm about to propose some specific features but mostly looking to hear whether you welcome such changes before I spend a great time. I'm putting forward multiple orthogonal testing features, you may opt for any subset, just share if at least some seem valuable to you.\r\n\r\n1. Test code simplification - as one example, we may make the tests a little less verbose using t.throws instead of try-catch statements, see prtscn for example\r\n![image](https://user-images.githubusercontent.com/8571500/58761182-fde10480-8549-11e9-8b8f-7063fcb9f41f.png)\r\n\r\nI have other code simplification to propose, just not sure if this level of enhancements is of interest\r\n\r\n2. Multi-dependencies version tests - since the code might run with a varying version of dependencies, run *some* of the tests against multiple dependencies version using a tool like [test-all-versions](https://www.npmjs.com/package/test-all-versions) or other\r\n\r\n3. Common additional CI checks - vulnerabilities checks, mutation testing, coverage threshold, etc\r\n\r\n4. E2E tests - Currently the CI runs only narrow tests (unit, narrow-integration, etc). Maybe it's worth also include a few, no more than 3-5, tests that approach the system realistically across processes, real networking (not in-process hooks or binding), with common HTTP scenarios. For example, OPTIONS request followed by an authentication request and then a payload request. The aim is to catch smoke, across the board. The aim, like any other E2E test, is to see all the units playing together and catch non-functional bugs\r\n\r\n5. Run tape in parallel - if we do opt for runnings wider tests (E2E), then utilizing more cores can speed-up significantly (very easy with node-tap)\r\n\r\n## Motivation\r\nEasier maintainability fo tests, catch more *types* of issues, speed-up the development\r\n\r\nPlease outline the motivation for the proposal.\r\n\r\n## Example\r\nI've attached an example above with prtscn. Let me know whether you need more"},"comment":{"url":"https://api.github.com/repos/fastify/fastify/issues/comments/503279572","html_url":"https://github.com/fastify/fastify/issues/1688#issuecomment-503279572","issue_url":"https://api.github.com/repos/fastify/fastify/issues/1688","id":503279572,"node_id":"MDEyOklzc3VlQ29tbWVudDUwMzI3OTU3Mg==","user":{"login":"brodybits","id":1559888,"node_id":"MDQ6VXNlcjE1NTk4ODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1559888?v=4","gravatar_id":"","url":"https://api.github.com/users/brodybits","html_url":"https://github.com/brodybits","followers_url":"https://api.github.com/users/brodybits/followers","following_url":"https://api.github.com/users/brodybits/following{/other_user}","gists_url":"https://api.github.com/users/brodybits/gists{/gist_id}","starred_url":"https://api.github.com/users/brodybits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brodybits/subscriptions","organizations_url":"https://api.github.com/users/brodybits/orgs","repos_url":"https://api.github.com/users/brodybits/repos","events_url":"https://api.github.com/users/brodybits/events{/privacy}","received_events_url":"https://api.github.com/users/brodybits/received_events","type":"User","site_admin":false},"created_at":"2019-06-18T19:33:26Z","updated_at":"2019-06-18T19:33:26Z","author_association":"NONE","body":"??"}}
{"actor":{"display_login":"brodybits"}}