v4.0.0
Major Changes
-
8f9310dThanks @mvantellingen! - Declaremswas a peer dependency (^2.14.6) instead of a bundled runtime dependency. The mock creates msw request handlers (viactMock) that consumers register into their ownsetupServer, so the handler factory and the consumer's server must resolve to a single shared msw instance. Bundling msw as a direct dependency allowed package managers to install a second, isolated copy whenever the consumer pinned a different msw version — handlers created by one copy then silently fail to match requests intercepted by the other (e.g. the/oauth/*token handler no longer matching/oauth/token).Migration: add
msw(^2.14.6or newer) to your own dependencies. Most consumers already depend on msw for their test setup.