forked from dc-js/dc.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.js
31 lines (22 loc) · 979 Bytes
/
env.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
process.env.TZ = "America/Los_Angeles";
var document = global.document = require("jsdom").jsdom("<html><head></head><body></body></html>"),
window = global.window = document.createWindow();
// https://github.com/chad3814/CSSStyleDeclaration/issues/3
var CSSStyleDeclaration_prototype = window.CSSStyleDeclaration.prototype,
CSSStyleDeclaration_setProperty = CSSStyleDeclaration_prototype.setProperty;
CSSStyleDeclaration_prototype.setProperty = function(name, value, priority) {
return CSSStyleDeclaration_setProperty.call(this, name + "", value == null ? null : value + "", priority == null ? null : priority + "");
};
require("./env-xhr");
document.createRange = function() {
return {
selectNode: function() {},
createContextualFragment: function(html) { return jsdom.jsdom(html); }
};
};
d3 = require("d3");
crossfilter = require("crossfilter");
sinon = require("sinon");
$ = jQuery = require("jquery");
require("../dc");
require("./env-data");