3 ms·
Unit tests are used to test functions that have only defined inputs, and whose outputs depend only on those inputs. You can extract a lot of business logic int
by tunesmith 3y ago
Unit tests are used to test functions that have only defined inputs, and whose outputs depend only on those inputs.
You can extract a lot of business logic into those kinds of functions. There's a whole art in writing "unit testable code". Those unit tests have value.
What's left is the pile code and scenarios that need to be tested in other ways. But part of the art is in shrinking down that pile as much as possible.