1 2 3 4 5 6 7 8 9 10 11 12 13 | 1× 1× 1× 1× 1× 1× | (function() {
if (Itypeof document !== 'undefined') {
return;
}
var jsdom = require('jsdom').jsdom;
global.document = jsdom('<html><head></head><body></body></html>');
global.window = document.defaultView;
global.navigator = {
userAgent: 'node.js'
};
})(); |