5 ms·
> var anyTrue = loggedIn | hasGreenHair | likesBananas;//the property to test Does this do what I think it does? This is terrible practice. Tests should not r
by tantalor 2y ago
> var anyTrue = loggedIn | hasGreenHair | likesBananas;//the property to test
Does this do what I think it does?
This is terrible practice. Tests should not replicate the business logic of the production code.
- ris 2y agoImplementing a very cut-down and basic sketch of the business rules of a particular observable effect can allow you to cover a lot of cases in a very compact and digestible form without falling into the traps that your actual business rules do. This is fairly fundamental to property-based testing. If you use literal expected results for all of your test cases, you're probably either not covering enough cases or making your tests so verbose and long that they will start to diverge in weird ways.