browser-cache-mock

JSON →
library 0.1.7 ·javascript
verified Jun 7, 2026

A mock implementation of the Cache API (Cache, CacheStorage) for Node.js testing environments. Version 0.1.7 provides an in-memory cache for testing browser caching strategies without a browser. It ships TypeScript types and is designed for use with test frameworks like Jest or Mocha. This package allows mocking the Cache API to verify cached response behavior, such as offline support or cache-first strategies. The library is minimal and focused, with no external runtime dependencies, and is primarily maintained by MechanicalRock.