How To Do Manual Mock In Jest Unit Testing

A much powerful but uncommon way of mocking service in jest unit test

LF Attraction

--

Photo by Victoria Strukovskaya on Unsplash

Jest has two ways to mock functions: Either by creating a mock function to use in test code or writing a manual mock to override a module dependency. Today I am going to demonstrate how to use manual mock.

--

--

LF Attraction

Please follow me to get the newest articles since medium's blocked my traffic