summaryrefslogtreecommitdiff
path: root/web-ui/test/integration/setup.js
blob: 49cd381efcb58f47f6cceeeb5c203834139d5f30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Enzyme setup file
// https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md
var jsdom = require('jsdom').jsdom;

global.document = jsdom('');
global.window = document.defaultView;
Object.keys(document.defaultView).forEach((property) => {
  if (typeof global[property] === 'undefined') {
    global[property] = document.defaultView[property];
  }
});

global.navigator = {
  userAgent: 'node.js'
};