This should nearly always include writing integration tests (that run on every change) to ensure you can refactor with confidence.
If there are no tests, the team will waste a ton of time anxiously monitoring and reasoning about the messy code and the impact of their changes.