Feb 11, 2025
These are the kind of situations when tests could come in really handy. Refactors are high-risk, and a pretty bullet-proof way to mitigate those risks is have tests. It doesn't even have to be unit tests, even some E2E tests for all the possible UX flows would catch this one quite easily.