If we write tests in a way nobody is able to understand them,
then we end up with tests not worth writing. Because an
automated test that takes me more time to understand than
it would take me to just check the same thing manually, does
not provide any value. One feature of tests that leads to this
kind of problem is wall-of-text tests. If it takes too much code
to specify your setup or expectation, look for easier ways.
Do basic refactoring. Get rid of duplication. There is always
light at the end of the tunnel. You just have to open your eyes.
Share this: | Follow me: