Skip to content

Commit d7b7a45

Browse files
committed
Fix JSDOM initialization for the new version
1 parent bb44ce5 commit d7b7a45

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/es6/helpers.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
let assert = require('assert');
22
let jsdom = require('jsdom');
33

4-
global.document = jsdom.jsdom('<!DOCTYPE html><html><body></body></html>');
5-
global.window = document.parentWindow;
4+
global.document = jsdom.jsdom(undefined, {
5+
virtualConsole: jsdom.createVirtualConsole().sendTo(console)
6+
});
7+
global.window = global.document.defaultView;
68
global.navigator = { userAgent: "Node.JS" };
79

810
let React = require('react/addons');

0 commit comments

Comments
 (0)