4 ms·
If the added test makes your code hard to refactor, then the test is too low-level. Trigger the bug by exercising the higher level abstractions, then refactorin
by enneff 7y ago
If the added test makes your code hard to refactor, then the test is too low-level. Trigger the bug by exercising the higher level abstractions, then refactoring won't care about the test (and in fact, you'll be glad the test is there when you refactor).
WRT "brittle", sometimes a test fails when you're doing maintenance; you can look at the test and sometimes it makes sense to delete it, sometimes it shows you that your maintenance has unintended consequences. You can't make that judgment call if you didn't write/keep the test.