logoalt Hacker News

xenophonftoday at 3:59 AM1 replyview on HN

TIL. That looks like a nice way to add tests to legacy code without having to re-create what TDD would have had the developers started that way.


Replies

globular-toasttoday at 7:03 AM

It is indeed a good way to add regression testing to code with no tests. But it's no substitute for TDD. It can't tell you why something is the way it is, nor can it distinguish between intentional and incidental (although maybe some would argue you shouldn't, given Hyrum's law and all). But it will at least guide you as you try to figure that out and stop you breaking stuff constantly.