mock-fetch-api

JSON →
library 1.0.7 ·javascript
verified Jun 7, 2026

A lightweight library (v1.0.7, no recent releases) for mocking HTTP requests and responses using the fetch API or isomorphic-fetch in unit tests. It provides a simple chainable API: when().withExpectedHeader().otherwiseRespondWith().respondWith(), plus failNextCall() for network errors. Compared to fetch-mock, it is less active and feature-limited but easier to read.