Mocking with Jest

Jest provides several different ways to mock out things. Here's an effort to list out the most useful ones in a short post. Manual Mocks The most basic kind of mocking is by providing a __mocks__ directory next to the module you want to mock and provide a mock implementation…