Hi there ๐๐ผ
This is my short note where I wanna talk How I'm covering changes with tests (or how I write tests for my code) and find out how are you doing this.
Questions which I ask myself after all changes:
What's kind of a change?
Answer options: feature/fix/improvement
So, next if is the feature then
Features
For feature you always should write new tests.
If the change is logic then write unit-tests and if the change is visual only then write snapshot tests.
Improvements and bugs
If after running tests you have broken tests fix its and if all tests pass it means that a broken thing could have a test โ write a test to never break again.
Create a test
At last, let's talk about creating. Creating have three nodes: unit, snapshots and combined tests.
Full scheme
Thank you!
Top comments (0)