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

Fix with-jest example #4978

Merged
merged 1 commit into from
Aug 17, 2018
Merged

Fix with-jest example #4978

merged 1 commit into from
Aug 17, 2018

Conversation

HaNdTriX
Copy link
Contributor

@HaNdTriX HaNdTriX commented Aug 17, 2018

Running the with-jest example results in the following error:

 FAIL  __tests__/index.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>)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.943s
Ran all test suites.
error Command failed with exit code 1.

Upgrading the dependencies (jest) to the latest version helps!

More info

Related #4776

@lourencorodrigo
Copy link

I updated the "jest.config.js" with testURL: "http://localhost/" and it worked.

@timneutkens timneutkens merged commit edaf1b4 into vercel:canary Aug 17, 2018
@HaNdTriX HaNdTriX deleted the jest branch August 18, 2018 10:04
@HaNdTriX
Copy link
Contributor Author

@lourencorodrigo yes that did work with an older version.
The problem was based on a new version of JSDOM bug they fixed it in the meantime.
The latest one doesn't need this configuration.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants