Jest Mock: mock external file/lib method in test cases

This particular article is my solution to try and mock a particular external method (using jest mock method) in the test case for a simple example app. Hope this article saves time for a lot of fellow devs in the community!