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

import { JSDOM } from 'jsdom';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
Enzyme.configure({ adapter: new Adapter() });
const { window } = new JSDOM('', {
userAgent: 'node.js',
});
Object.keys(window).forEach(property => {
if (typeof global[property] === 'undefined') {
global[property] = window[property];
}
});