yarn msw 0.19.0

latest releases: 2.2.14, 2.3.0-ws.rc-6, 2.3.0-ws.rc-5...
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.