Skip to content

Commit

Permalink
Framework: Re-pin to newer version of JSDOM
Browse files Browse the repository at this point in the history
Newer version is SemVer-compatible with jest-environment-jsdom and includes support for Element#closest out of the box.

jsdom/jsdom#1555

Required to ignore license validation for abab because while it is a compatible license (BSD 3-clause), the package's `license` field is malformed for parse.

https://github.com/jsdom/abab/blob/4327de3aae348710094d9f3c1f0c1477d9feb865/package.json#L26
https://github.com/jsdom/abab/blob/master/LICENSE.md
  • Loading branch information
aduth committed Sep 12, 2018
1 parent aeb7084 commit 52cff5f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 55 deletions.
88 changes: 43 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"build:packages": "cross-env EXCLUDE_PACKAGES=babel-plugin-import-jsx-pragma,jest-console,postcss-themes node ./bin/packages/build.js",
"build": "npm run build:packages && cross-env NODE_ENV=production webpack",
"check-engines": "check-node-version --package",
"check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2\" \"wp-scripts check-licenses --dev\"",
"check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2 --ignore=abab\" \"wp-scripts check-licenses --dev --ignore=abab\"",
"ci": "concurrently \"npm run lint\" \"npm run test-unit:coverage-ci\"",
"predev": "npm run check-engines",
"dev": "npm run build:packages && concurrently \"cross-env webpack --watch\" \"npm run dev:packages\"",
Expand Down
6 changes: 0 additions & 6 deletions packages/jest-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
## 2.1.0 (Unreleased)

### New Features

- Browser globals setup now includes polyfill for [`Element#closest`](https://developer.mozilla.org/en-US/docs/Web/API/Element/closest)

## 2.0.0 (2018-07-12)

### Breaking Change
Expand Down
1 change: 0 additions & 1 deletion packages/jest-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"dependencies": {
"@wordpress/jest-console": "file:../jest-console",
"babel-jest": "^23.4.2",
"element-closest": "^2.0.2",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"jest-enzyme": "^6.0.2"
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-preset-default/scripts/setup-globals.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require( 'element-closest' );

// These are necessary to load TinyMCE successfully
global.URL = window.URL;
global.window.tinyMCEPreInit = {
Expand Down

0 comments on commit 52cff5f

Please sign in to comment.