Mock Service Worker
Mock application HTTP endpoints and return controlled responses during testing.
mswjs · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
In a Node.js project, install [email protected]. Give a fictional URL a local JSON reply and verify it without contacting the site.
What we tested
3.0.7. Give a fictional URL a local JSON reply and verify it without contacting the site. Intercepted the fixture request and matched its local response without using an external service.