Suggest a tool

Mock Service Worker

Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.

What Mock Service Worker is

Mock Service Worker (MSW) is an API mocking library for JavaScript. Request handlers use Express-like routing with parameters, wildcards and regular expressions. Handlers return custom status codes, headers, cookies, delays or resolvers. In the browser, setupWorker uses the Service Worker API to answer intercepted requests at the network level. In Node.js, setupServer applies a low-level interception algorithm to the same request handlers. Application code does not stub fetch or axios, so it runs unaware of mocking. The same mock definitions serve unit, integration and end-to-end tests, as well as local development.

Written from the project's README, read .

Category
Test data and mocking
License
MIT
Language
TypeScript
Changelog
Releases on GitHub

Repository metrics

Repository metrics
Stars18,2161
Forks6261
Open issues and PRs371
Contributors1821
Commits in the last 90 days121
Last commit2026-09-081
Last releasev2.15.0, 2026-07-081
Fetched

1 Fetched from the GitHub or GitLab API on . Hover a value for its own date.

Status

activeLast commit within 90 days of the fetch date.

Computed from the last commit date and the archive flag on the fetch date. See the status rules.

Alternatives

Listed test data and mocking tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from Mock Service Worker's, with its source. See also Mock Service Worker alternatives.

Comparisons

Questions

Is Mock Service Worker open source?

Yes. Mock Service Worker is released under MIT, an OSI-approved license, as reported by the GitHub API on 2026-09-22.

Is Mock Service Worker maintained?

On 2026-09-22, the last commit to the default branch was on 2026-09-08, so the listed status is active. Rule: Last commit within 90 days of the fetch date.

How many GitHub stars does Mock Service Worker have?

18,216 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.

What language is Mock Service Worker written in?

The repository's primary language, as reported by the GitHub API, is TypeScript.

Sources

  1. GitHub REST API: repository, read
  2. GitHub REST API: commits, read
  3. GitHub REST API: latest release, read
  4. GitHub REST API: contributors, read
  5. README, read