{"library":"vitest-fetch-mock","type":"library","category":null,"description":"Vitest Fetch Mock (v0.4.5) is a fetch mocking library for Vitest, forked from jest-fetch-mock. It mocks the global fetch API using Vitest's vi.fn() under the hood, providing a simple API to mock responses, inspect calls, and reset state. Works with Vitest >=2.0.0 and Node >=18. Unlike nock or msw, it directly replaces global.fetch without interceptors or service workers. Ships TypeScript types.","language":"javascript","status":"active","version":"0.4.5","tags":["javascript","vitest","mock","fetch","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install vitest-fetch-mock","imports":["import createFetchMock from 'vitest-fetch-mock';","fetchMock.mockResponse(JSON.stringify({ok: true}));","globalThis.fetch = fetchMock;"]},{"cmd":"yarn add vitest-fetch-mock","imports":[]},{"cmd":"pnpm add vitest-fetch-mock","imports":[]}],"homepage":"https://github.com/IanVS/vitest-fetch-mock#readme","github":"https://github.com/IanVS/vitest-fetch-mock","docs":null,"changelog":null,"pypi":null,"npm":"vitest-fetch-mock","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}