Test-Preserving Transformation
My reaction to that, as usual, was that a refactoring preserves behavior you care about. Then I thought, well, you should have a test for behavior you care about. (”If it’s not tested, it doesn’t work.”) That, then, is my new definition of refactoring: A refactoring is a test-preserving transformation.