mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-23 21:15:05 +01:00
e0ada97770
* Update autoprefixer to version 7.1.0 * Update axios to version 0.16.1 * Update babel-cli to version 6.24.1 * Update babel-eslint to version 7.2.3 * Update babel-preset-react to version 6.24.1 * Update coffee-script to version 1.12.6 * Update css-loader to version 0.28.1 * Update express to version 4.15.2 * Update js-yaml to version 3.8.4 * Update mocha to version 3.4.1 * Update jsdom to version 10.1.0 * Update npmlog to version 4.1.0 * Update postcss-smart-import to version 0.7.0 * Update postcss-loader to version 2.0.5 * Update pg to version 6.1.5 * Update prop-types to version 15.5.10 * Update rails-ujs to version 5.1.1 * Update redis to version 2.7.1 * Update sass-loader to version 6.0.5 * Update stringz to version 0.2.0 * Update webpack to version 2.5.1 * Update style-loader to version 0.17.0 * Update sinon to version 2.2.0 * Update react-motion to version 0.5.0 * Update react-notification to version 6.7.0 * Update react-redux-loading-bar to version 2.9.0 * Update react-intl to version 2.3.0 * Update redux-immutable to version 4.0.0 * Update reselect to version 3.0.1 * Update react-toggle to version 3.0.1 * Update react-simple-dropdown to version 3.0.0 * Update react-router to version 3.0.5 * Update react-router-scroll to version 0.4.2 * Update react-toggle to version 4.0.1 * yarn upgrade
23 lines
659 B
JavaScript
23 lines
659 B
JavaScript
import { jsdom } from 'jsdom/lib/old-api';
|
|
import chai from 'chai';
|
|
import chaiEnzyme from 'chai-enzyme';
|
|
chai.use(chaiEnzyme());
|
|
|
|
var exposedProperties = ['window', 'navigator', 'document'];
|
|
|
|
global.document = jsdom('');
|
|
global.window = document.defaultView;
|
|
Object.keys(document.defaultView).forEach((property) => {
|
|
if (typeof global[property] === 'undefined') {
|
|
exposedProperties.push(property);
|
|
global[property] = document.defaultView[property];
|
|
}
|
|
});
|
|
|
|
global.navigator = {
|
|
userAgent: 'node.js'
|
|
};
|
|
|
|
var React = window.React = global.React = require('react');
|
|
var ReactDOM = window.ReactDOM = global.ReactDOM = require('react-dom');
|