IT lexicon › Web › MSW

MSW Mock Service Worker

Web På svenska → Updated: 2026-05-23
More info
Creator
Artem Zakharchenko
Released
Type
API mocking via Service Worker
License
MIT
Website
Source
github.com/mswjs/msw

Mock HTTP requests at the network layer via Service Worker (browser) or node:http interception (Node) — same code in both environments.

Differs from traditional mocking (axios-mock, fetch-mock) by intercepting at the network layer. The application code doesn't have to change. The default choice in modern React/Vue test stacks paired with React Testing Library + Vitest. Also good with Storybook (render components with mock data).

← Back to the lexicon