I think two points are valid for this question. First, as the Jest documentation explains, jest.spyOn
also calls the spied method, so a custom implementation needs to be provided.
And second, a helper function is easier to mock if it is in a different file. If not, the tested function will look first for the helper in the same file, instead of the mocked one. This was explained here: https://stackoverflow.com/a/52318294/7478816