3 ms·
My experience is that if you can cheat the tests in this way then they are either too narrow in scope, or badly written tests. This is something that TDD tries
by Huggernaut 11y ago
My experience is that if you can cheat the tests in this way then they are either too narrow in scope, or badly written tests. This is something that TDD tries to expose when being adhered to strictly, that is, do the simplest thing to make this test pass - if you `assertTrue(isEmpty())` then I can simply `return true` to make you improve your tests.
- chris_wot 11y agoIf a consultant writes assert(isEmpty()) then the first thing I'm going to do is fire up version control, find the consultant and have them fired.