|
|
|
|
|
by jkubicek
911 days ago
|
|
> In actual practice, about 99% of unit tests I see amount to "verifying that our code does what our code does" and are a useless waste of time and effort. If you rephrase this as, "verifying that our code does what it did yesterday" these types of tests are useful. When I'm trying to add tests to previously untested code, this is usually how I start. 1. Method outputs a big blob of JSON
2. Write test to ensure that the output blob is always the same
3. As you make changes, refine the test to be more focused and actionable
|
|