Keeping Mocks Externalized
In this lesson, we'll be separating all mocks in their own Javascript file.
Mocks Separation
Jest allows us to have all our mocks separated in their own JavaScript file, placing them under a __mocks__ folder, keeping the tests as clean as possible.
So we can take the jest.mock block from the top of the Form.test.js ...
Access this course and 1600+ top-rated courses and projects.