Unit tests have the greatest ROI when either
On the other hand, unit tests have very low ROI when a feature is not business-critical and has requirements that change very frequently.
Note that the value of unit tests is like everything else: it depends.
As to alternatives, I’ve had cases where API tests (on a running test instance of the application) provided an immensely high ROI. Integration tests, in the sense of testing the collaboration of a chuck of your codebase, those have for me always had a low ROI, because of the effort in setting up while still only resembling actual production behaviour (due to the mocked parts).
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.