Browse Source

Upgrade jsdom to version 11.0.0 (#3994)

pull/4/head
Yamagishi Kazutoshi 5 years ago
committed by Eugen Rochko
parent
commit
ead14f5bf0
3 changed files with 20 additions and 20 deletions
  1. +1
    -1
      package.json
  2. +6
    -12
      spec/javascript/setup.js
  3. +13
    -7
      yarn.lock

+ 1
- 1
package.json View File

@ -123,7 +123,7 @@
"eslint": "^3.19.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.3",
"jsdom": "^10.1.0",
"jsdom": "^11.0.0",
"mocha": "^3.4.1",
"react-intl-translations-manager": "^5.0.0",
"react-test-renderer": "^15.6.1",

+ 6
- 12
spec/javascript/setup.js View File

@ -1,19 +1,13 @@
import { jsdom } from 'jsdom/lib/old-api';
import { JSDOM } from 'jsdom';
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) => {
const { window } = new JSDOM('', {
userAgent: 'node.js',
});
Object.keys(window).forEach(property => {
if (typeof global[property] === 'undefined') {
exposedProperties.push(property);
global[property] = document.defaultView[property];
global[property] = window[property];
}
});
global.navigator = {
userAgent: 'node.js',
};

+ 13
- 7
yarn.lock View File

@ -121,6 +121,10 @@
react-split-pane "^0.1.63"
redux "^3.6.0"
"@types/[email protected]^6.0.46":
version "6.0.78"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.78.tgz#5d4a3f579c1524e01ee21bf474e6fba09198f470"
[email protected]^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d"
@ -3911,9 +3915,9 @@ [email protected]~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
[email protected]^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-10.1.0.tgz#7765e00fd5c3567f34985a1c86ff466a61dacc6a"
[email protected]^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.0.0.tgz#1ee507cb2c0b16c875002476b1a8557d951353e5"
dependencies:
abab "^1.0.3"
acorn "^4.0.4"
@ -3925,7 +3929,7 @@ [email protected]^10.1.0:
escodegen "^1.6.1"
html-encoding-sniffer "^1.0.1"
nwmatcher ">= 1.3.9 < 2.0.0"
parse5 "^1.5.1"
parse5 "^3.0.2"
pn "^1.0.0"
request "^2.79.0"
request-promise-native "^1.0.3"
@ -4919,9 +4923,11 @@ [email protected]^2.2.0:
dependencies:
error-ex "^1.2.0"
[email protected]^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94"
[email protected]^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.2.tgz#05eff57f0ef4577fb144a79f8b9a967a6cc44510"
dependencies:
"@types/node" "^6.0.46"
[email protected]~1.3.1:
version "1.3.1"

Loading…
Cancel
Save