Last active
July 25, 2016 17:46
-
-
Save codeaholicguy/33d7ddf5baf886205ae6f049fe263bbe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {expect} from 'chai'; | |
import jsdom from 'jsdom'; | |
const document = jsdom.jsdom('<!doctype html><html><body></body></html>'); | |
const window = document.defaultView; | |
global.document = document; | |
global.window = window; | |
Object.keys(window).forEach((key) => { | |
if (!(key in global)) { | |
global[key] = window[key]; | |
} | |
}); | |
global.React = React; | |
global.expect = expect; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment