diff --git a/package.json b/package.json index 4d68eee44742..a172d5b48b00 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "harmonize": "~1.33.7", "jasmine-only": "0.1.0", "jasmine-pit": "~2.0.0", - "jsdom": "~0.10.3", + "jsdom": "^3.0.1", "node-find-files": "~0.0.2", "node-haste": "^1.2.8", "node-worker-pool": "~2.4.2", diff --git a/src/JSDomEnvironment.js b/src/JSDomEnvironment.js index f6691f01fdf9..47ba195bd935 100644 --- a/src/JSDomEnvironment.js +++ b/src/JSDomEnvironment.js @@ -29,7 +29,8 @@ function JSDomEnvironment(config) { // use it (depending on the context -- such as TestRunner.js when operating as // a workerpool parent), this is the best way to ensure we only spend time // require()ing this when necessary. - this.global = require('./lib/jsdom-compat').jsdom().parentWindow; + // this.global = require('./lib/jsdom-compat').jsdom().parentWindow; + this.global = require('jsdom').jsdom().parentWindow; // Node's error-message stack size is limited at 10, but it's pretty useful to // see more than that when a test fails. @@ -71,12 +72,12 @@ function JSDomEnvironment(config) { // jsdom doesn't have support for window.Image, so we just replace it with a // dummy constructor - try { - /* jshint nonew:false */ - new this.global.Image(); - } catch (e) { - this.global.Image = function Image() {}; - } + // try { + // /* jshint nonew:false */ + // new this.global.Image(); + // } catch (e) { + // this.global.Image = function Image() {}; + // } // Pass through the node `process` global. // TODO: Consider locking this down somehow so tests can't do crazy stuff to