Thiago Zilli Sarmento
2020 May
Just a few reasons (of many)...
• Find bugs early...
• Find regressions before someone else finds them...
• Supports easier implementation refactoring...
• Pseudo documentation in code...
• etc...
Just a few reasons (of many)...
• Tests must be part of Continuous Integration...
• Tests must be part of Continuous Deploy...
• Tests must be part of work flow... (sap)
• Database interactions...
• API endpoints (end-to-end)...
• Metrics...
• Test A and Test B behavior... and more
70% code coverage is required for basic metrics!
• Avoid having side effects in your functions
• Tests should NOT rely on testing order (run independently)
• Tests should be repeatable
• Bogus your inputs
Resorces
• https://nestjs.com/
• https://jestjs.io/
• https://github.com/visionmedia/supertest