wheresrhys/fetch-mock
Mock http requests made using fetch observed · 2026-08-28
Health v2 · maintenance only
83/100
- Activity 98
- Release rhythm 54
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 6.0
- age_days: 4143
- days_rel: 307
- days_push: 15
- n_releases_24m: 19
Adoption not part of the score
1309 stars · 191 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
fetch-mock is a JavaScript library for mocking HTTP requests made with the fetch API, with an intuitive API for routing mocks based on request criteria. It runs in environments from Node.js to service workers and is compatible with most testing frameworks.
Use cases
- mock fetch requests in unit tests
- simulate different HTTP responses based on URL or criteria
- test code that calls the fetch API in node
- intercept fetch calls in service workers
- stub network responses for frontend testing
When to choose
- your code uses the fetch API and you need deterministic tests
- you need fine-grained routing of mocked responses by URL, method, or other criteria
- you need a mock that works across node, browsers, and service workers
When to avoid
- your code uses axios or another XHR-based client rather than fetch
- you need full end-to-end tests against a real server
- you want automatic request recording/replay rather than hand-written mocks
Facets
library · maturity active
mocking http-client testing testing web-development developer-tools browser cross-platform fetch-api http-mocking test-utilities service-workers monorepo nodejs javascript
2 sources
- readme: https://github.com/wheresrhys/fetch-mock · fetched 2026-08-28 · 92ddbe6585fc
- homepage: http://www.wheresrhys.co.uk/fetch-mock/ · fetched 2026-08-29 · 9a5f16916fae
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| wheresrhys/fetch-mock | main | 83 |
For agents
markdown · JSON · MCP: product_card(name="wheresrhys/fetch-mock")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem