UNPKG

react-lru

Version:

Least recently used (LRU) cache algorithm rendering of React roots

8 lines (6 loc) 315 B
import jsdom from 'jsdom'; // A super simple DOM ready for React to render into // Store this DOM and the window in global scope ready for React to access global.document = jsdom.jsdom('<!doctype html><html><body></body></html>'); global.window = document.defaultView; global.navigator = { userAgent: 'node.js' };