In this particular case, I wouldn't be worried that this code is going to break, but unit testing it allows it to be tested in isolation without having actually boot up your app, and get it into the state that it needs to be in to see the results. In addition, it affords future developers with an understanding of why this function is here, and how to use it, as well as giving you a place to test various edge cases.
That said, an integration test or e2e test would be useful to make sure that you've actually called the function correctly, in other words, that you've glued everything together properly.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In this particular case, I wouldn't be worried that this code is going to break, but unit testing it allows it to be tested in isolation without having actually boot up your app, and get it into the state that it needs to be in to see the results. In addition, it affords future developers with an understanding of why this function is here, and how to use it, as well as giving you a place to test various edge cases.
That said, an integration test or e2e test would be useful to make sure that you've actually called the function correctly, in other words, that you've glued everything together properly.