graphql-import-loader
graphql-import-loader copied to clipboard
add testURL to jest config so tests don't break
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