code: function propagateToGlobal(window) {
    for (var key in window) {
      if (!window.hasOwnProperty(key)) {
        continue;
      }
      if (key in global) {
        continue;
      }
      global[key] = window[key];
    }
  }
docs: from mocha-jsdom https://github.com/rstacruz/mocha-jsdom/blob/master/index.js#L80