Packages

msw

3.0.7 · 18 Nov 2026MIT36M / weekRepositoryHomepagenpmAtom feed

Your version

0.16.2

20 May 2020Where it was published

0.49.3 is the newest release of 0.16.x.

In short

5 new1 fixed

Release note

Features

  • GraphQL requests are now being printed into browser’s console using a proper format (operation name / response status) (#161, #174)

  • Each custom request handler can have its own log function that controls what and how gets printed into browser’s console for introspection:

// my-handler.js
export const myHandler = () => {
  return {
    log(req, res, handler) {
      console.log('%s %s', req.method, req.url.href)
    }
  }
}

The information available in the log function:

  • req, intercepted request instance;

  • res, resolved mocked response object;

  • handler, exact request handler that captured this request.

Bug fixes

  • Fixes an issue that resulted into a request body with the Content-Type: application/json to be unparsed in req.body reference of the request handler (#171, #172).

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.