You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
359 B

  1. import { JSDOM } from 'jsdom';
  2. import Enzyme from 'enzyme';
  3. import Adapter from 'enzyme-adapter-react-16';
  4. Enzyme.configure({ adapter: new Adapter() });
  5. const { window } = new JSDOM('', {
  6. userAgent: 'node.js',
  7. });
  8. Object.keys(window).forEach(property => {
  9. if (typeof global[property] === 'undefined') {
  10. global[property] = window[property];
  11. }
  12. });