MSW 2.0 introduces new changes to the Mock Service Worker library, including a refined public API with first-class support for Fetch API primitives. The update aims to improve the educational aspect of the library, allowing developers to learn concepts and APIs that can be applied outside of MSW. The new version also embraces JavaScript standards and removes the need for polyfills, providing a feature-rich and standard way of handling requests and defining responses. MSW 2.0 deprecates support for Node.js v14 and relies on the standard Fetch API for representing requests and responses.

8m read timeFrom mswjs.io
Post cover image
Table of contents
The beginningsThe essenceThe way forwardThe new APIOne more thingMigration guideClosing thoughtsSpecial thanks

Sort: