Javascript – Why should I mock a function instead of using the function itself to unit test?
I'm honestly confused about the goal of mocking certain functions when unit testing my app. I've seen articles suggesting I should mock everything I test, but also others suggesting I should avoid mocking as much as possible. I need some…