From e7d3c22d7169c95e285a25afa0371bfd1971e89b Mon Sep 17 00:00:00 2001 From: Brian Sayler Date: Thu, 25 Oct 2018 10:46:47 -0500 Subject: [PATCH] add testURL to jestConfig (#91) Fixes `SecurityError: localStorage is not available for opaque origins`. See issue #90 --- jest.config.js | 1 + other/configuration/calculator.solution/jest.config.js | 1 + other/jest-expect/jest.config.js | 1 + other/simple-react/jest.config.js | 1 + server/jest.config.js | 1 + 5 files changed, 5 insertions(+) diff --git a/jest.config.js b/jest.config.js index 974f78f1..0313733b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,6 @@ module.exports = { coverageDirectory: './coverage', + testURL: 'http://localhost', collectCoverageFrom: [ '**/src/**/*.js', '!**/__tests__/**', diff --git a/other/configuration/calculator.solution/jest.config.js b/other/configuration/calculator.solution/jest.config.js index 34fffe46..73038fcc 100644 --- a/other/configuration/calculator.solution/jest.config.js +++ b/other/configuration/calculator.solution/jest.config.js @@ -1,6 +1,7 @@ module.exports = { displayName: 'calculator', testEnvironment: 'jsdom', + testURL: 'http://localhost', setupTestFrameworkScriptFile: require.resolve( './test/setup-test-framework.js', ), diff --git a/other/jest-expect/jest.config.js b/other/jest-expect/jest.config.js index ac0d094b..c8feec92 100644 --- a/other/jest-expect/jest.config.js +++ b/other/jest-expect/jest.config.js @@ -1,3 +1,4 @@ module.exports = { displayName: 'expect', + testURL: 'http://localhost', } diff --git a/other/simple-react/jest.config.js b/other/simple-react/jest.config.js index 0dd0e5cd..cbbd8ca4 100644 --- a/other/simple-react/jest.config.js +++ b/other/simple-react/jest.config.js @@ -1,3 +1,4 @@ module.exports = { displayName: 'react', + testURL: 'http://localhost', } diff --git a/server/jest.config.js b/server/jest.config.js index b2ba703e..1ac7278f 100644 --- a/server/jest.config.js +++ b/server/jest.config.js @@ -1,6 +1,7 @@ // ./server/jest.config.js module.exports = { displayName: 'server', + testURL: 'http://localhost', testEnvironment: 'node', modulePaths: ['/src', '/test'], }