`ReferenceError: Element is not defined` when running mocha tests on React+Onsenui app
<p>While trying to setup a test environment I ran into the following problem. When I run the tests (using <code>mocha ./src/test/.setup.js ./src/test/**.test.js</code>), I get a <code>Element is not defined</code> error:</p>

<pre><code>app\node_modules\onsenui\js\onsenui.js:603
  var originalCreateShadowRoot = Element.prototype.createShadowRoot;
                                 ^

ReferenceError: Element is not defined
    at app\node_modules\onsenui\js\onsenui.js:603:34
    at app\node_modules\onsenui\js\onsenui.js:359:7
    at Array.forEach (native)
    at initializeModules (app\node_modules\onsenui\js\onsenui.js:358:13)
    at app\node_modules\onsenui\js\onsenui.js:908:5
    (...)
</code></pre>

<p>How is this possible, isn't Element a basic DOM element?</p>

<p>The following versions are used:</p>

<ul>
<li>enzyme@2.4.1</li>
<li>mocha@3.0.2</li>
<li>onsenui@2.0.0-rc.17</li>
<li>react@15.3.1</li>
<li>react-onsenui@0.7.5</li>
</ul>

<p>The following .setup.js file is used:</p>

<pre><code>require('babel-register')({
    presets: ["react","airbnb","es2015"]
});

var jsdom = require('jsdom').jsdom;

var exposedProperties = ['window', 'navigator', 'document'];

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

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

documentRef = document;
</code></pre>

<p>And the test file is as follows:</p>

<pre><code>import React from 'react';
import { expect } from 'chai';
import { shallow, mount, render } from 'enzyme';

import * as Ons from 'react-onsenui';
import MainPage from '../react/MainPage/MainPage.jsx';

describe("Component MainPage", function() {
    it("should have a Ons.Page component", function() {
        const wrapper = mount(&lt;MainPage /&gt;);
        expect(wrapper.find(Ons.Page)).to.equal(true);
    });
});
</code></pre>