Skip to content

fabiospampinato/happy-dom-global

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Happy DOM Global

Make Node a browser-like environment, by using Happy DOM.

Install

npm install --save happy-dom-global

Usage

Simply importing it will register browser-like globals:

import 'happy-dom-global';

console.log ( typeof globalThis.window ); // => 'object'
console.log ( typeof globalThis.document ); // => 'object'
console.log ( typeof globalThis.location ); // => 'object'

License

MIT © Fabio Spampinato