Skip to content
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

Fixing SecurityError during jest run #19

Merged
merged 1 commit into from Jul 28, 2018

Conversation

pnevares
Copy link
Contributor

Sometime yesterday a new version of jsdom began throwing an error below when running tests with jest, more info here: jestjs/jest#6766

This workaround seems more appropriate for the project than the testURL option mentioned at that link.

 FAIL  src/valid-json.test.js
  ● 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>)

If it's fixed quickly by jsdom or jest teams, disregard ⏳

@mayank23
Copy link
Contributor

Thanks @pnevares !! This sounds like the best option and since this plugin should be run in the node environment anyways 😃

Sent with GitHawk

@mayank23 mayank23 added the bug Something isn't working label Jul 28, 2018
@mayank23 mayank23 merged commit c7bfef4 into godaddy:master Jul 28, 2018
@pnevares pnevares deleted the fix-jest-securityerror branch July 28, 2018 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants