A fetch mocking library designed specifically for Bun's runtime (≥1.0.0). Version 1.0.2 provides a simple API for mocking HTTP requests in Bun tests with TypeScript support. Key differentiators: zero external dependencies, first-class Bun integration (no polyfills needed), assertion helpers to verify all mocks were used, and support for dynamic responses. Released as MIT, actively maintained on GitHub.
npm install bun-fetch-mockNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: initialize mock inside describe, define routes, and verify all mocks are used.
Move useFetchMock() call to describe scope.
Ensure path consistency between mocked routes and actual fetch calls.
Call fetchMock.assertAllMocksUsed() before the test ends.
Ensure you are running tests with Bun (bun test) or polyfill fetch globally.
Run 'bun add -d bun-fetch-mock' from the correct project root.
No dependency data recorded yet.