-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update testURL default value from about:blank to localhost #6792
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6792 +/- ##
=======================================
Coverage 63.66% 63.66%
=======================================
Files 235 235
Lines 9010 9010
Branches 3 3
=======================================
Hits 5736 5736
Misses 3273 3273
Partials 1 1
Continue to review full report at Codecov.
|
needs a changelog entry |
I always forget this :) Pushing now |
When will this be released? |
@mjesun mind releasing a patch? |
The following errors were fixed. ``` ● Test suite failed to run SecurityError: localStorage is not available for opaque origins at Window.get localStorage [as localStorage] (node_modules/jsdom/lib/jsdom/browser/Window.js:257:15) at Array.forEach (<anonymous>) ``` * https://github.com/facebook/jest/blob/master/CHANGELOG.md#2350 * jestjs/jest#6792
Resolved at 23.5.0 jestjs/jest#6792
Resolved at 23.5.0 jestjs/jest#6792
Avoids issues with localStorage in JSDOM 11.12 Can be removed when running Jest 23.5.0 or newer See: jestjs/jest#6766 See: jestjs/jest#6792
Avoids issues with localStorage in JSDOM 11.12 Can be removed when running Jest 23.5.0 or newer See: jestjs/jest#6766 See: jestjs/jest#6792
jestjs/jest#6792 fixes a security error in tests
* Framework: Replace element-closest with registered vendor script * Scripts: Add support for license ignore * Framework: Re-pin to newer version of JSDOM 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 * Testing: Add dummy testURL for Jest config Avoids issues with localStorage in JSDOM 11.12 Can be removed when running Jest 23.5.0 or newer See: jestjs/jest#6766 See: jestjs/jest#6792 * Licenses: Add BSD-3-Clause W3C variant as an allowed license Also, check if the license defined in package.json is telling us to look in the license file, instead. * Package: Scripts: Use String#includes for improved code clarity * Package: Scripts: Add CHANGELOG notes for improved license file detection
The failed tests that had to be fixed relate to jestjs/jest#6792
The failed tests that had to be fixed relate to jestjs/jest#6792
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Updates jests default value for testURL from 'about:blank' to 'http://localhost'.
This ensures that JSDOM doesn't throw a security error for tests using the jsdom environment.
Should fix #6766
Test plan
All tests pass
cc @thymikee @SimenB