Quiz
Jest Mocking in Unit Tests
Understand why we mock dependencies like a database when unit testing a Node service with Jest.
You are writing a Jest unit test for a UserService.getUser() method that internally calls a real database module. Why should you replace the database module with jest.mock() instead of hitting the real database?