Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Unit Testing is Overrated (2020). Parent comment
Code does things, tests verify that it does the things I thought it did. Getting a bit of validation makes me feel good while working.
If it now needs to do completely different things then it needs different tests.
Also, if you are making huge changes to tests whenever you change a single detail, that's an issue with your code, not testing in general.
Type checks are good too. Using a typed language is even better.
There are no comments on this comment yet.
Code does things, tests verify that it does the things I thought it did. Getting a bit of validation makes me feel good while working.
If it now needs to do completely different things then it needs different tests.
Also, if you are making huge changes to tests whenever you change a single detail, that's an issue with your code, not testing in general.
Type checks are good too. Using a typed language is even better.