2
globals = ["document", "window", "navigator", "CSSStyleDeclaration", "d3"],
5
globals.forEach(function(global) {
6
if (global in self) globalValues[global] = self[global];
9
document = require("jsdom").jsdom("<html><head></head><body></body></html>");
10
window = document.createWindow();
11
navigator = window.navigator;
12
CSSStyleDeclaration = window.CSSStyleDeclaration;
18
globals.forEach(function(global) {
19
if (global in globalValues) self[global] = globalValues[global];
20
else delete self[global];