> never found a legacy JS codebase that has a robust test suite, so any refactoring I do can be hard to test and verify.
Wouldn't you just... make a test suite?
Wouldn't you just... make a test suite?
If you're so disconnected that you don't know the user's perspective or have no way to see the program in action, then ..best of luck!
Legacy code bases are more often that not huge monstrosities. Maybe you do start with some tests and increment, but there's no "just" involved.
I tried adding tests to a legacy AngularJS application (it was in the process of being phased out but was still business critical). I sunk days into trying to get a test to run, let alone pass, before giving up and deciding that eventual replacement was going to be quicker than finding good AngularJS documentation.
Not sure if sarcasm or serious.