msw-fetch-mock
JSON →An undici-style fetch mock API built on top of MSW (Mock Service Worker) for testing. Version 0.6.1 supports Node.js (>=18), browser, and native (no MSW dependency) environments via subpath exports. It provides a familiar fluent API similar to Cloudflare Workers' fetchMock or Node.js undici's MockAgent. Key differentiators: integrates seamlessly with MSW, supports both MSW v1 (via /legacy) and v2, and allows sharing existing MSW servers. Peer dependency on MSW ^1.0.0 or ^2.12.7. Active development with CI, weekly downloads ~500.
Resources
packagemsw-fetch-mock ↗