github mswjs/msw v0.19.0

latest releases: v2.2.14, v2.2.13, v2.2.12...
3 years ago

Features

  • The library now defers all the client-side requests that happen between calling worker.start() and successful worker activation. This eliminates race condition between the two, and now comes as the default behavior. (#190, #196)

The behavior of deferring requests can be configured using the waitUntilReady: boolean option on worker.start():

import { setupWorker, rest } from 'msw'

const worker = setupWorker(/* request handlers */)

worker.start({
  // You can opt-out of the deferred network requests behavior.
  waitUntilReady: false
})

Don't miss a new msw release

NewReleases is sending notifications on new releases.