Skip to content

v0.8.2

Compare
Choose a tag to compare
@kettanaito kettanaito released this 13 Mar 22:25

Features

  • Running start() and stop() functions now returns a Promise that corresponds to the Service Worker registration/unregistration status
import { composeMocks, rest } from 'msw'

const { start, stop } = composeMocks(
  rest.get(...)
)

start.then(() => {/* Your logic here */})
stop.then(() => {/* Your logic here */})