Axios adapter that uses Light my Request to inject HTTP requests without a real server, ideal for testing Fastify or Node.js HTTP handlers. Current stable version: 0.4.0. Release cadence is low (last release 2021). Key differentiator: enables in-process HTTP testing with Axios without network I/O, supporting both generic HTTP dispatch and Fastify applications. Requires Node >=20, axios ^1, and fastify >=4 as peer dependencies. Ships TypeScript types. Caveats include unsupported maxRedirects, socketPath, proxy, and httpAgent.
npm install axios-light-my-request-adapterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an Axios instance with Light my Request adapter using a plain Node.js HTTP dispatch handler, then makes a GET request.
Avoid setting maxRedirects in Axios config; use a different approach for redirect handling.
Remove socketPath or proxy from Axios config when using this adapter.
Do not rely on custom agents; they have no effect.
Upgrade Node.js to version 20 or later.
Remove maxRedirects from Axios request config.
Remove socketPath from Axios request config.
Ensure you import createLightMyRequestAdapter correctly and call it: adapter: createLightMyRequestAdapter(dispatch).