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