Skip to content

Instantly share code, notes, and snippets.

@kaimallea
Last active May 23, 2016 16:54
Show Gist options
  • Save kaimallea/cd8cf2f91bc8a43fa068e71559b0bed4 to your computer and use it in GitHub Desktop.
Save kaimallea/cd8cf2f91bc8a43fa068e71559b0bed4 to your computer and use it in GitHub Desktop.
diff --git a/test/js/common.js b/test/js/common.js
index 8c26dd8..e891743 100644
--- a/test/js/common.js
+++ b/test/js/common.js
@@ -58,7 +58,7 @@ global.spweb = {};
html = '<html><body></body></html>';
}
- jsDomDocument = jsdom(html, null, {
+ jsDomDocument = jsdom(html, {
features: {
QuerySelector: true
}
@@ -140,7 +140,7 @@ global.spweb = {};
}
var document = self.createJsDomDocument();
- jsDomWindow = document.createWindow();
+ jsDomWindow = document.defaultView;
/* Attach postMessage support */
jsDomWindow.postMessageFromOrigin = function(data, origin) {
diff --git a/test/js/test/spec.tooltip.js b/test/js/test/spec.tooltip.js
index eeb3bbf..178f0de 100644
--- a/test/js/test/spec.tooltip.js
+++ b/test/js/test/spec.tooltip.js
@@ -7,7 +7,7 @@ var common = require('../common.js'),
sinon = require('sinon'),
jsdom = require("jsdom").jsdom;
document = jsdom(''),
- window = document.createWindow();
+ window = document.defaultView;
jQuery = require('jquery');
@@ -92,4 +92,4 @@ describe('Tooltip', function() {
});
});
-});
\ No newline at end of file
+});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment