Skip to content

Instantly share code, notes, and snippets.

@marr
Created January 22, 2016 20:04
Show Gist options
  • Save marr/55c19dc4bde5b8b45394 to your computer and use it in GitHub Desktop.
Save marr/55c19dc4bde5b8b45394 to your computer and use it in GitHub Desktop.
import jsdom from 'jsdom'
import chai from 'chai'
import plugin from 'chai-enzyme'
const doc = jsdom.jsdom('<!doctype html><html><body></body></html>')
const win = doc.defaultView
global.document = doc
global.window = win
global.navigator = win.navigator
global.React = require('react')
global.expect = require('chai').expect
global.createTest = require('./createTest').default
chai.use(plugin())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment