Skip to content

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