declare var global ; declare var require ; "use strict" ; import { jsdom } from "jsdom" ; let FAKE_DOM_HTML = "<html><body></body></html>" ; if ( typeof document === "undefined" ) { global . document = jsdom ( FAKE_DOM_HTML ) ; global . window = global . document . defaultView ; global . navigator = window . navigator ; }