setupTests.js 443 B

12345678910111213
  1. /* eslint-disable import/first */
  2. import '../src/polyfill';
  3. import { jsdom } from 'jsdom';
  4. import Enzyme from 'enzyme';
  5. import Adapter from 'enzyme-adapter-react-16';
  6. Enzyme.configure({ adapter: new Adapter() });
  7. // fixed jsdom miss
  8. const documentHTML = '<!doctype html><html><body><div id="root"></div></body></html>';
  9. global.document = jsdom(documentHTML);
  10. global.window = document.defaultView;
  11. global.navigator = global.window.navigator;