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.
npm i -D browser-cache-mock
Add the following to your test code:
; const cacheMock = ; window = ...window caches: ...windowcaches open: async cacheMock ...cacheMock ;