This website uses cookies to ensure you get the best experience.
Learn more.
A developer wants to use Copilot to refactor a stable payment module without changing behavior. Which sequence provides the strongest evidence that the refactor is safe?
Published
- Delete the old tests because generated code uses a more modern style.
- Accept the refactor if it contains fewer lines than the original.
- Establish representative behavior tests, make a bounded refactor, then run the tests and inspect the diff.
- Generate a new implementation and rewrite all expected test outputs to match it.
Comments — 0
Sign in to comment