Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Commit

Permalink
fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbansal committed May 11, 2017
1 parent 2da12d9 commit 345d21b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"jsdom": "~10.1.0",
"prop-types": "~15.5.8",
"react": "~15.5.4",
"react-addons-test-utils": "~15.5.1",
"react-dom": "~15.5.4",
"react-router-dom": "~4.1.1",
"rimraf": "~2.6.1",
Expand Down
5 changes: 3 additions & 2 deletions tests/.setup.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const jsdom = require('jsdom');

const documentHTML = '<!doctype html><html><body><div id="root"></div></body></html>';
global.document = jsdom.jsdom(documentHTML);
global.window = document.parentWindow;
const dom = new jsdom.JSDOM(documentHTML);
global.document = dom.window.document;
global.window = dom.window;
global.window.resizeTo = (width, height) => {
global.window.innerWidth = width || global.window.innerWidth;
global.window.innerHeight = width || global.window.innerHeight;
Expand Down

0 comments on commit 345d21b

Please sign in to comment.