pretenderjs/pretender
A mock server library with a nice routing DSL observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- 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: n/a
- age_days: 4525
- days_rel: n/a
- days_push: 947
- n_releases_24m: 0
Adoption not part of the score
1262 stars · 155 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Pretender is a browser-only mock server library that intercepts XMLHttpRequest and Fetch requests and routes them to handlers defined with an express/sinatra-style DSL. It is commonly used in frontend testing to simulate backend APIs without a real server.
Use cases
- mock api responses in browser tests
- intercept fetch and xmlhttprequest requests
- stub backend endpoints for frontend development
- test ajax calls without a real server
- define fake rest routes with an express-style dsl
When to choose
- you need to mock XHR or Fetch in browser-based tests like Ember or QUnit suites
- you want a lightweight, express-style routing DSL for fake endpoints
- you're developing a frontend against an unfinished backend API
When to avoid
- you need to mock requests in Node.js or server-side code (Pretender is browser-only)
- you need full HTTP server simulation with networking, TLS, or websockets
- your project uses modern alternatives like MSW and wants active maintenance
Facets
library · maturity maintenance
mocking http-client routing testing testing web-development frontend developer-tools browser mock-server xhr fetch request-interception express-style-dsl frontend-testing javascript nodejs
2 sources
- readme: https://github.com/pretenderjs/pretender · fetched 2026-08-28 · f5c1b9c1c710
- registry_npm: https://registry.npmjs.org/pretender · fetched 2026-08-29 · 9cf1313b1a66
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| pretenderjs/pretender | main | 23 |
For agents
markdown · JSON · MCP: product_card(name="pretenderjs/pretender")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem