Over time, good programmers build up a library of working code which gets ported from project to project.
Having a library of test code makes this even easier. Instead of messing around with the code, port the test code first. It’s much more fungible.