Mock Service Worker
Verified
We've verified that the organizationmswjs controls the domain:
- mswjs.io
Mock Service Worker is an API mocking library for browser and Node.js that uses a Service Worker to intercept requests that actually happened. This means no request client stubs and unmatched resilience when it comes to request integrity, as your app now performs requests the same way it does in production.
We favor composition in both how we write our code and how we distribute it. That's why instead of building a single monolithic package that's responsible for too many things, we distribute thecore module with the essentials that everybody could use, and provide a set of standaloneextensions that enable specific workflows and push the developer experience even further.
| Package | Description |
|---|---|
@msw/data | Model and query your mock data (fixtures). |
@mswjs/source | Generate request handlers from various sources (HAR files, OpenAPI documents). |
@mswjs/http-middleware | Spawn an HTTP server from your request handlers. |
| Package | Description |
|---|---|
@msw/playwright | Official Playwright integration. |
msw-storybook-addon | Official Storybook add-on. |
This project is the result of hundreds of hours of work that our contributors spend so that you could enjoy the best API mocking experience there is to offer. If you'd like us to bring new features and mitigate issues more effectively, consider supporting us.
👉Support Mock Service Worker via GitHub Sponsors
By becoming a baker you help us ensure a bright future for the project. We value and treasure every contribution, big or small. Thank you.
PinnedLoading
- msw-storybook-addon
msw-storybook-addon PublicMock API requests in Storybook with Mock Service Worker.
- http-middleware
http-middleware PublicSpawn an HTTP server from your request handlers or apply them to an existing server using a middleware.
Repositories
Uh oh!
There was an error while loading.Please reload this page.
mswjs/mswjs.io’s past year of commit activity - source Public
Generate MSW request handlers from various sources (HAR files, OpenAPI documents, etc).
Uh oh!
There was an error while loading.Please reload this page.
mswjs/source’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
mswjs/examples’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
mswjs/jest-fixed-jsdom’s past year of commit activity
