Problem Statement
Which Jest function allows you to replace real modules with test doubles?
Explanation
jest.mock() replaces real modules or dependencies with fake ones for isolated testing.
This helps test components without performing actual API calls or file reads.
Code Solution
SolutionRead Only
jest.mock('axios', () => ({ get: jest.fn() }));