You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecate support for TypeScript 5.1 and 5.2 (#2730)
worker.stop() returns a Promise (#2724). Awaiting it is relevant only for in-flight critical scenarios.
graphql is now exported as msw/graphql (#2691). GraphQL is now handled as a proper optional peer dependency.
Removes the handleRequest() utility. Please use the defineNetwork() API instead.
GraphQLLinkHandlers type has been renamed to GraphQLLink.
The file:// requests now throw in Node.js as they normally do (not supported by fetch).
The Content-Length request header is now removed by bypass().
HTTP-to-WebSocket upgrade requests performed via fetch() now throw in Node.js as they normally do (not supported by fetch).
Cookies are no longer managed in Node.js for better compatibilty. Instead, whatever is the default behavior of your environment that's the cookie behavior you get. This has no effect on the browser.
WebSocket connection life cycle event has been renamed to websocket:connection (#2783).
onUnhandledRequest option has been renamed to onUnhandledFrame.
The library no longer patches setTimeout to circumvent fake timers in test runners. You should advance the fake timers normally for delayed mocked responses to resolve.
The library no longer returns a mocked cookie string on request.headers.get('cookie') in the handlers. It returns null in all environments. Please use the cookies resolver argument to have cookie-based logic.
Features
Supports Node.js v24 and v26.
Supports TypeScript v6.0 and v7.0.
You can import individual utilities, like delay or passthrough, from the new msw/utils entrypoint for smaller footprint on your bundle.
Support GraphQL v17.0.
Support intercepting page navigations and form submissions (#2721).