Earlier quoted context omitted.
> 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?
If there is no pre-existing test suite, it is extremely difficult to know what is the right expected behavior that should be tested, and what is incidental to the implementation.
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!