|
|
|
|
|
by Ygg2
1537 days ago
|
|
> "Considering the factors mentioned above, we can reason that unit tests are only useful to verify pure business logic inside of a given function." > That just isn't true and it makes the rest of the blogpost also not true. It's not? Writing unit test is all about minimizing side effects and interaction with other systems. |
|
Not really. Writing unit tests is all about verifying behavior from combinations of inputs, and side effects are inputs as well.
You can write unit tests that inject delays and timeouts and retries and throw exceptions under specific circumstances.