graphql-import-loader icon indicating copy to clipboard operation
graphql-import-loader copied to clipboard

add testURL to jest config so tests don't break

Open dsanch3z opened this issue 7 years ago • 0 comments

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

dsanch3z avatar Oct 04 '18 16:10 dsanch3z