mirror of
https://github.com/kevinsqi/react-circular-progressbar.git
synced 2025-12-08 20:25:50 +00:00
21 lines
544 B
JavaScript
21 lines
544 B
JavaScript
/* global document */
|
|
|
|
// https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md#using-enzyme-with-jsdom
|
|
|
|
const jsdom = require('jsdom').jsdom;
|
|
|
|
const exposedProperties = ['window', 'navigator', 'document'];
|
|
|
|
global.document = jsdom('');
|
|
global.window = document.defaultView;
|
|
Object.keys(document.defaultView).forEach((property) => {
|
|
if (typeof global[property] === 'undefined') {
|
|
exposedProperties.push(property);
|
|
global[property] = document.defaultView[property];
|
|
}
|
|
});
|
|
|
|
global.navigator = {
|
|
userAgent: 'node.js',
|
|
};
|