This posts intention was not to conflict with his point. I used it as a hook and because the simple perfect function he was showing reminded me of the one I mentioned in the article.
We tested for both, the "happy" and the negative path. But the Javascript unit tests are run without the framework in between. So our function was returning expected results when run in isolation. Only when running it with Next.js the function became async which led to this dilemma.