Testing · Junior · Question 37 of 78
What is MSW (Mock Service Worker)?
- ✓Correct answer: A library that intercepts requests at the network level and answers with mock responses, in the browser and in Node.js
- 2A service worker that caches the site for offline use
- 3A Jest plugin for snapshot tests
Explanation
The app code keeps calling real fetch; MSW returns responses from handlers. The same handlers work in tests, Storybook and local development.