Is there an website like https://www.betterspecs.org/ for helping people with a collection of best practices or guidelines on how to do write good tests.
- When to use describe?
- How a good test description looks like ?
- When and where should I use
- Should I mock or not mock? What would the a good pattern?
I don’t know about a website, but the book Testing Elixir (currently in beta) looks promising to help with those questions. I’m looking forward to reading it.
My initial idea was to find a website/repository similar to
betterspecs. But it looks like there is not, and maybe not necessary ?
I know the bad thing about
betterspecs is because it says what is the best and it’s very opinionated, for instance this idea of using always factories.
I like how José mentioned the idea of using factories X fixtures, showing the idea of both sides. It will depend on what you’re doing and what you want to achieve on your test.
I started something and I tried to get some comments from José and the community, and we could have a compilation of these links/comments. Maybe the book Testing Elixir will be enough. ¯_(ツ)_/¯