mswjs/msw

The industry standard for API mocking in JavaScript.

View on GitHub ↗Jump to charts ↓Open shareable report →

Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 2 hours ago
Added to GitGenius on September 3rd, 2026
Created on November 13th, 2018
Open Issues & Pull Requests: 16 (-1)
GitHub issues: Enabled
Number of forks: 630
Total Stargazers: 18,271 (+0)
Total Subscribers: 65 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 7.1 hours
Mean response time: 14.3 days
90th percentile: 13.0 days
Tracked items: 1,181

Maintainer activity

2 people did triage or write work on this repository in the last 12 months.

Counts unlabeled, assigned, unassigned, milestoned, demilestoned, locked, unlocked over the last 12 months. These are issue and pull request events that require triage or write permission. Commits and code review are not counted. labeled and renamed are excluded because GitHub issue forms record the issue author as the actor. Figures from October 7, 2026. This count is not comparable across projects: each project's automation decides which of these events a person emits.

How this project is maintained

Practically every issue opened in the past year has drawn a reply. 90% of issues opened in the past year have since been closed. Three people close 85% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 15
New in 7 days: 6
Closed in 7 days: 3
Avg open age: 574 days
Stale 30+ days: 7
Stale 90+ days: 6

Recent activity

Opened in 7 days: 4
Closed in 7 days: 2
Comments in 7 days: 10
Events in 7 days: 30

Top labels

  • bug (779)
  • needs:triage (361)
  • scope:node (354)
  • scope:browser (285)
  • feature (245)
  • needs:discussion (80)
  • help wanted (68)
  • needs:reproduction (51)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

Mock Service Worker is an API mocking library for JavaScript that uses service workers to intercept requests at the network level.

The tool solves the problem of testing applications against APIs that may not exist, are unstable, or need to be designed alongside the application. It works by leveraging the Service Worker API to intercept HTTP requests before they reach the network, allowing you to respond with mock data without modifying your application code. This approach means your app remains unaware of whether requests are being mocked, and you can test against the same request patterns you would use in production. The library provides Express-like routing syntax for defining handlers, supporting parameters, wildcards, regular expressions, and custom response configurations including status codes, headers, cookies, and delays.

Developers should choose this tool if they want mocks that live alongside their application code rather than in separate configuration, and if they need the same mocking layer to work across both browser-based tests and Node.js environments. The library suits projects where you want to avoid modifying application code to detect mocks, and where you need to test actual application behavior against realistic API interactions. The browser-based approach using Service Workers distinguishes it from other mocking solutions by allowing you to inspect mocked responses in browser DevTools just as you would real network requests.

The project maintains a substantial base of adopters, as evidenced by the fact that almost all open issues are raised by outside users rather than the core team. Maintainers typically respond to new issues and pull requests within a day. Work in the issue tracker is dominated by bug reports and triage activities, with a notable focus on Node.js scope improvements.