text: import Enzyme from 'enzyme';
  import Adapter from 'enzyme-adapter-react-16';
  
  Enzyme.configure({ adapter: new Adapter() });
  
  const { JSDOM } = require('jsdom');
  
  const jsdom = new JSDOM('<!doctype html><html><body></body></html>');
  jsdom.reconfigure({ url: 'http://localhost' })
  const { window } = jsdom;
  
  function copyProps(src, target) {
    Object.defineProperties(target, {
      ...Object.getOwnPropertyDescriptors(src),
      ...Object.getOwnPropertyDescriptors(target),
    });
  }
  
  global.window = window;
  global.document = window.document;
  global.navigator = {
    userAgent: 'node.js',
  };
  global.requestAnimationFrame = function (callback) {
    return setTimeout(callback, 0);
  };
  global.cancelAnimationFrame = function (id) {
    clearTimeout(id);
  };
  copyProps(window, global);
  