v0.19.0
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
})