-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Description
The section about Assert Libraries discourage the use of them.
But I guess there's a little bit mistake in this approach because we have good libraries that provide assert functions.
The argument omits interesting information about what the test got right is not the real true, is more easy to understand what the test does with 2 or 3 asserts than a if with 2 or 3 ORs inline. Furthermore libraries as Testify provide rich and easy-readable informations when the test fails in the assert functions.
Finally, using asserts or ifs don't guarantee that the test is right, the argument Assert libraries make it too easy to write imprecise tests is more about the quality of test than the use of an assert library.