Breaking changes
- The Life-cycle events are now exposed from the
.events
property on the worker/server (#868).
-worker.on('request:start', listener)
+worker.events.on('request:start', listener)
-server.on('response:mocked', listener)
+server.events.on('response:mocked', listener)
Features
- Life-cycle events now support
.removeListener()
and.removeAllListeners()
methods (#868).
// Removes all life-cycle event listeners you've attached to this server instance.
server.events.removeAllListeners()
- The "error" strategy of the
onUnhandledRequest
option now throws an exception to halt running tests (#856).
Bug fixes
- Fixes an issue where a request handler with parenthesis in the URL wouldn't match an otherwise matching request (#857).
Security
- Updates the
@mswjs/interceptors
package to propagate thexmldom
security update (#876).