🕷 Super-agent driven library for testing node.js HTTP servers using a fluent API. Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
14.4k
Stars
782
Forks
187
Open issues
30
Contributors
AI Analysis
Supertest is a high-level HTTP assertion library for testing Node.js servers, built on top of superagent and providing a fluent API for writing test assertions. It serves developers building HTTP-based applications who need to validate server behavior in test suites. It is specifically designed for Node.js HTTP testing and is not a general-purpose tool—it integrates with test frameworks like Mocha but is primarily used by developers testing Express, Koa, and similar server frameworks.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Supertest: the de facto HTTP integration testing library for Node.js, now maintained by Forward Email
Supertest provides a fluent, chainable API for firing HTTP requests directly against Node.js server instances (Express, Koa, raw http, etc.) without needing a running network listener. It wraps superagent to add assertion helpers, making it easy to assert status codes, headers, and response bodies in a single chain. Originally created by TJ Holowaychuk and now maintained by the Forward Email / Lad.js ecosystem, it is a standard dependency in millions of Node.js projects. Its primary audience is backend and full-stack JavaScript developers who want lightweight integration tests without spinning up a full server.
Created in June 2012 by TJ Holowaychuk as a companion to superagent. Ownership transferred to the ladjs/forwardemail org when original maintainers moved on. Has accumulated 14k+ stars over 13 years of continuous use.
Growth was driven largely by the dominance of Express.js in the Node.js ecosystem during 2013–2018; supertest became the go-to testing tool for Express apps. Adoption compounded through inclusion in countless tutorials, boilerplates, and course curricula. Star growth has plateaued (10 stars/week as of mid-2026) reflecting saturation of a mature, stable niche rather than decline — it is already embedded in a large installed base.
14,377 GitHub stars and 782 forks across 13 years. The npm package 'supertest' has been one of the most downloaded Node.js testing packages for years — public npm download data historically shows tens of millions of weekly downloads, though current figures cannot be confirmed from available metadata alone. Explicit organizational use by Forward Email and the Lad.js family of projects is documented in the README. Widely referenced in Node.js testing tutorials and official framework documentation.
Appears to be a thin wrapper around superagent: the request() function accepts an http.Server or Express app, binds it to an ephemeral port if not already listening, and returns a superagent Request object augmented with .expect() assertion methods. Likely minimal own logic, delegating HTTP mechanics entirely to superagent. HTTP/2 support is exposed via an options argument, suggesting relatively recent extension of the core pattern.
Code coverage badge linked to Codecov is present in the README, suggesting automated coverage tracking exists, though the actual percentage is not stated in the README excerpt.
Last push was 2026-04-02, approximately 12 weeks before the analysis date — indicating active maintenance. The repo is explicitly listed as maintained for multiple production projects (forwardemail, ladjs, spamscanner, breejs, cabinjs, lassjs), giving it organizational backing. CI is run via GitHub Actions. This is slow-moving but clearly not stagnant.
ADOPT IF: you are building or maintaining a Node.js HTTP server (especially Express/Koa) and want a minimal, well-understood integration testing tool with no additional infrastructure. AVOID IF: you are starting a new project with a framework that provides first-party test injection (e.g., Fastify's inject, Hono's testClient), or you need full E2E browser simulation. MONITOR IF: you are evaluating whether the superagent dependency (also maintained by the same org) keeps pace with modern fetch-based HTTP standards, as that is the primary long-term dependency risk.
Independent dimensions
Mainstream potential
4/10
Technical importance
7/10
Adoption evidence
9/10
- Supertest's core dependency is superagent, which is also a legacy library facing relevance pressure from native fetch and newer HTTP clients; if superagent falls behind, supertest inherits the problem.
- The project is now primarily maintained as an internal dependency of one organization (Forward Email / Lad.js); bus factor risk exists if that organization's priorities shift.
- Framework-native test utilities in newer Node.js frameworks (Fastify, Hono, Elysia) may reduce the need for a separate testing abstraction in greenfield projects.
- The fluent API's error handling with .end() callbacks is a known footgun (assertions that fail silently), and migrating users to promise/async patterns requires ongoing documentation effort.
- Slow star growth and low weekly delta (10/week) may discourage adoption by teams using star count as a proxy for community health, even though the project is functionally stable.
Supertest will remain a dominant testing utility for the large existing base of Express/Koa applications for years, but its share of new project adoption will gradually decline as framework-native test tooling matures.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- JavaScript
- License
- MIT
- Last updated
- 3mo ago
- Created
- 171mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Top contributors
Recent releases
Similar repos
forwardemail/superagent
Superagent is a lightweight HTTP client library (~50 KB minified+gzipped) that...
flightcontrolhq/superjson
Superjson safely serializes JavaScript objects containing non-JSON types...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
14.4k | +9 | JavaScript | 8/10 | 3mo ago |
|
|
16.7k | — | JavaScript | 7/10 | 6mo ago |
|
|
4.2k | — | JavaScript | 8/10 | 3d ago |
|
|
4.5k | — | TypeScript | 8/10 | 10h ago |
|
|
5.3k | — | TypeScript | 8/10 | 3w ago |
|
|
6.7k | — | TypeScript | 7/10 | 3mo ago |
Lower-level approach with no fluent assertion API; supertest provides more ergonomic DX for HTTP assertions without additional setup.
Mocks HTTP at the client level rather than testing a real server handler; supertest actually invokes the server, making it better for true integration coverage.
Playwright's API testing mode offers similar HTTP assertions but is heavier and primarily aimed at teams already using Playwright for E2E browser tests.
Newer frameworks (Hono, Fastify inject) provide first-party lightweight test utilities that may reduce need for supertest in greenfield projects outside Express.
Various thin wrappers exist to improve DX inside Jest/Vitest environments, but they depend on supertest itself rather than replacing it.