mirror of
https://github.com/koel/koel
synced 2024-12-22 18:43:21 +00:00
13 lines
283 B
JavaScript
13 lines
283 B
JavaScript
import { jsdom } from 'jsdom';
|
|
|
|
const doc = jsdom('<!doctype html><html><body></body></html>');
|
|
const win = doc.defaultView;
|
|
|
|
global.document = doc;
|
|
global.window = win;
|
|
|
|
Object.keys(window).forEach((key) => {
|
|
if (!(key in global)) {
|
|
global[key] = window[key];
|
|
}
|
|
});
|