Permalink
Browse files

Removed chai from testSetup since it broke everything :(

  • Loading branch information...
1 parent 0cea962 commit 8fffc9b885371c72a1a544dab0679828c6df4e42 @okonet committed Apr 27, 2016
Showing with 9 additions and 15 deletions.
  1. +9 −15 testSetup.js
View
@@ -1,19 +1,13 @@
-var jsdom = require('jsdom').jsdom
-var chai = require('chai')
-var chaiEnzyme = require('chai-enzyme')
-chai.use(chaiEnzyme())
+const jsdom = require('jsdom').jsdom
-var exposedProperties = ['window', 'navigator', 'document'];
+global.document = jsdom('<!doctype html><html><body></body></html>')
+global.window = document.defaultView
-global.document = jsdom('');
-global.window = document.defaultView;
Object.keys(document.defaultView).forEach((property) => {
- if (typeof global[property] === 'undefined') {
- exposedProperties.push(property);
- global[property] = document.defaultView[property];
- }
-});
+ if (typeof global[property] === 'undefined') {
+ global[property] = document.defaultView[property]
+ }
+})
-global.navigator = {
- userAgent: 'node.js'
-};
+global.navigator = { userAgent: 'node.js' }
+global.documentRef = document

0 comments on commit 8fffc9b

Please sign in to comment.