{"library":"vitest-mock-axios","type":"library","category":null,"description":"Lightweight, synchronous Axios mock for Vitest testing framework. Current stable version is 0.1.0. Provides a simple API (mockResponse, mockError, lastReqGet, etc.) to simulate Axios requests synchronously in unit tests, making test logic easier to read and write. Key differentiators include synchronous promise resolution (no need to await or use microtasks) and full Vitest spy integration. Requires manual setup of a Vitest module mock in __mocks__/axios.js. Comparatively, alternatives like msw or nock are more feature-rich but typically asynchronous and heavier.","language":"javascript","status":"active","version":"0.1.0","tags":["javascript","axios","vitest","mock","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install vitest-mock-axios","imports":["import mockAxios from 'vitest-mock-axios'","vi.mock('axios', () => import('vitest-mock-axios'))","import type { MockAxios } from 'vitest-mock-axios'"]},{"cmd":"yarn add vitest-mock-axios","imports":[]},{"cmd":"pnpm add vitest-mock-axios","imports":[]}],"homepage":"https://github.com/jacksonGross/vitest-mock-axios#readme","github":"https://github.com/jacksonGross/vitest-mock-axios","docs":null,"changelog":null,"pypi":null,"npm":"vitest-mock-axios","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}