a mock for the browser cache that can be used in a node environment
npm install browser-cache-mock


A mock for the browser cache API that can be used in a node environment. Creating a new instance creates an in-memory cache that can enable you to test your browser caching strategies effectively.
* This module is Typescript ready.
``bash`
npm i -D browser-cache-mock
`javascript
import CacheMock from 'browser-cache-mock';
const cacheMock = new CacheMock();
window = {
...window,
caches: {
...window.caches,
open: async () => cacheMock,
...cacheMock
}
};
``
MIT