This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2017-06-29 04:03:03 -07:00
|
|
|
import { JSDOM } from 'jsdom';
|
2017-09-29 19:29:56 -07:00
|
|
|
import Enzyme from 'enzyme';
|
|
|
|
import Adapter from 'enzyme-adapter-react-16';
|
|
|
|
|
|
|
|
Enzyme.configure({ adapter: new Adapter() });
|
2016-10-12 09:06:18 -07:00
|
|
|
|
2017-06-29 04:03:03 -07:00
|
|
|
const { window } = new JSDOM('', {
|
|
|
|
userAgent: 'node.js',
|
|
|
|
});
|
2017-09-29 19:29:56 -07:00
|
|
|
|
2017-06-29 04:03:03 -07:00
|
|
|
Object.keys(window).forEach(property => {
|
2016-10-10 13:32:03 -07:00
|
|
|
if (typeof global[property] === 'undefined') {
|
2017-06-29 04:03:03 -07:00
|
|
|
global[property] = window[property];
|
2016-10-10 13:32:03 -07:00
|
|
|
}
|
|
|
|
});
|