about summary refs log tree commit diff
path: root/spec/javascript/setup.js
blob: c9c8aed077ef5bbc06ce317412528fd2a88c346e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { JSDOM } from 'jsdom';
import chai from 'chai';
import chaiEnzyme from 'chai-enzyme';
chai.use(chaiEnzyme());

const { window } = new JSDOM('', {
  userAgent: 'node.js',
});
Object.keys(window).forEach(property => {
  if (typeof global[property] === 'undefined') {
    global[property] = window[property];
  }
});