diff options
Diffstat (limited to 'web-ui/test/integration/setup.js')
-rw-r--r-- | web-ui/test/integration/setup.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/web-ui/test/integration/setup.js b/web-ui/test/integration/setup.js new file mode 100644 index 00000000..49cd381e --- /dev/null +++ b/web-ui/test/integration/setup.js @@ -0,0 +1,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' +}; |