3 ms·
> If testing your code is hard it means your code needs to be factored better. Stop what you’re doing and fix the design so that testing is easy again. Then ag
by rob74 3y ago
> If testing your code is hard it means your code needs to be factored better. Stop what you’re doing and fix the design so that testing is easy again.
Then again, another central selling point of having tests is that it enables refactoring without having to fear that you change the behaviour of the code. So, if you have a codebase without tests, you should write tests while changing the code as little as possible, and then refactor it.