summaryrefslogtreecommitdiff
path: root/web-ui/test/integration/setup.js
diff options
context:
space:
mode:
authorAnike Arni <aarni@thoughtworks.com>2017-02-10 18:18:17 -0200
committerAnike Arni <aarni@thoughtworks.com>2017-02-10 18:21:23 -0200
commit7fe1499dfb082045c5d7e3e76363a13e9d8e3618 (patch)
tree75ff2012973bf4c060f5b5e11b42d0e2733ce601 /web-ui/test/integration/setup.js
parent2753ec89b925f5038a85d6bc1fad7b5c887dbf1e (diff)
[#922] Adds integration test for translations
with @tayanefernandes
Diffstat (limited to 'web-ui/test/integration/setup.js')
-rw-r--r--web-ui/test/integration/setup.js15
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'
+};