logoalt Hacker News

SoftTalkeryesterday at 8:44 PM2 repliesview on HN

A refactor should not affect the tests at all should it? If it does, it's more than a refactor.


Replies

gchamonliveyesterday at 8:57 PM

It can if your refactor needs to deal with interface changes, like moving methods around, changing argument order etc... all these need to propagate to the tests

show 1 reply
magicalistyesterday at 8:56 PM

It depends on what you mean by "refactor" and how exactly you're testing, I guess, but that's not really at the heart of the point. red-green-refactor could also be used for adding new features, for instance, or an entire codebase, I guess.