There are heated discussions about tests but in my opinion tests are crucial for maintainability of code in an automated fashion. Can you do without them, probably yes if the repo is small enough and most devs know most of what's going on. Once it grows large enough that most devs can't keep it all in their heads, tests help a lot. Not a panacea, but definitely help guard against unintended mistakes due to lack of understanding.
With that preamble, changing code to be more testable is great so long as it doesn't involve adding code just for tests like "if (debug) {".
There are heated discussions about tests but in my opinion tests are crucial for maintainability of code in an automated fashion. Can you do without them, probably yes if the repo is small enough and most devs know most of what's going on. Once it grows large enough that most devs can't keep it all in their heads, tests help a lot. Not a panacea, but definitely help guard against unintended mistakes due to lack of understanding.
With that preamble, changing code to be more testable is great so long as it doesn't involve adding code just for tests like "if (debug) {".