A simple REST API mocking library for superagent in browser or Node.js. Version 0.5.2 (final release) with no updates since 2017. Allows defining route handlers for GET, POST, PUT, PATCH, DELETE with URL parameters and body access. Supports custom timeout, header matching, and route teardown. Differentiates by working directly on the superagent instance, no separate server needed, suitable for frontend testing.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESM import returns default function that takes superagent instance
First argument is string URL pattern, not object
Method is named clearRoutes, not clear
Shows basic mock setup: import, attach to superagent, define a GET route with URL param, set timeout, and issue request.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.