How to Make Calculation Tests Simpler and More Expressive with These New Refactorings
It is a good idea to make tests as descriptive as possible – to achieve Tests as Documentation. Including the calculations in the test is a big part of this, and avoids the Hard Coded Test Data smell.
For example, if a test looks like this, it is har...
freecodecamp.org7 min read