4 ms·
That's great, and I do the same. But you really need to ask yourself what value keeping those tests around in your repository is adding. In some cases, absolute
by ryanbrunner 10y ago
That's great, and I do the same. But you really need to ask yourself what value keeping those tests around in your repository is adding. In some cases, absolutely they will have value, but I don't think there's anything wrong with saying at least some of the tests you write were there as a tool to help you build.
For example, I almost always do "gold master" testing when refactoring a large unit or module of code (test the big picture input / output given a few cases without regard for fine-grained tests within, refactor away as long as you can keep the tests green). It's an amazing way of refactoring as it acts almost like a safety harness - you have immediate feedback when you've done something wrong and changed the behaviour of the class. After the refactoring is done, however, those tests are almost useless, as they don't test the purpose of a class but just dumbly look at the input and output.
I think a lot of the tests done via TDD should be looked at in the same way.