Is there a better way to mock modules with jest and ESM?
It starts with the title as being opinion-based. Then there is a question
is there a better way to avoid that syntax above every time I need to mock/spy a module function?
To me, this is also opinion-based. And it probably belongs on Code Review.