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

add testURL to jest config so tests don't break #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dsanch3z
Copy link

@dsanch3z dsanch3z commented Oct 4, 2018

This was the output of npm test

> [email protected] pretest /Users/dsanchez/projects/graphql-import-loader                                                                                         
> npm run build


> [email protected] build /Users/dsanchez/projects/graphql-import-loader                                                                                           
> rm -rf dist && tsc -d


> [email protected] test /Users/dsanchez/projects/graphql-import-loader                                                                                            
> jest

 FAIL  test/loader.test.ts
  ● 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.507s
Ran all test suites.
npm ERR! Test failed.  See above for more details.

And after adding "testURL": "http://localhost/" to the jest config, the tests passed as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant