Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
15 changes: 8 additions & 7 deletions src/JSDomEnvironment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down