Esta página aún no está disponible en Español, así que estás leyendo la versión en inglés.

Mock Service Worker

Mocks APIs by intercepting requests with a service worker in the browser (and at the network level in Node), for tests and development.

Mocks APIs by intercepting requests with a service worker in the browser (and at the network level in Node), for tests and development.

When to use it

You want realistic API mocks for development and tests. It is not for building your PWA's own service worker.

Get started

npm i -D msw

Source code, issues and documentation: github.com/mswjs/msw.