{"library":"axios-mock-adapter","type":"library","category":null,"description":"axios-mock-adapter is a lightweight mocking library for Axios that allows you to easily mock HTTP requests in tests by intercepting Axios calls and returning custom responses. v2.1.0 supports Axios >= 0.17.0 and works in both Node.js and browser environments. It provides a simple API for mocking requests by method, URL, parameters, and regex, with support for replyOnce, delays, network errors, and timeouts. Unlike nock or msw, it directly replaces the Axios adapter without requiring server setup, making it ideal for unit tests.","language":"javascript","status":"active","version":"2.1.0","tags":["javascript","axios","test","mock","request","stub","adapter","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install axios-mock-adapter","imports":["import AxiosMockAdapter from 'axios-mock-adapter';","import type { MockAdapterOptions } from 'axios-mock-adapter';","const mock = new AxiosMockAdapter(axiosInstance);"]},{"cmd":"yarn add axios-mock-adapter","imports":[]},{"cmd":"pnpm add axios-mock-adapter","imports":[]}],"homepage":"https://github.com/ctimmerm/axios-mock-adapter#readme","github":"https://github.com/ctimmerm/axios-mock-adapter","docs":null,"changelog":null,"pypi":null,"npm":"axios-mock-adapter","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}