Skip to content

Commit

Permalink
add testURL to jestConfig (kentcdodds#91)
Browse files Browse the repository at this point in the history
Fixes  `SecurityError: localStorage is not available for opaque origins`. See issue kentcdodds#90
  • Loading branch information
saylerb authored and Kent C. Dodds committed Oct 25, 2018
1 parent b2de80a commit e7d3c22
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
coverageDirectory: './coverage',
testURL: 'http://localhost',
collectCoverageFrom: [
'**/src/**/*.js',
'!**/__tests__/**',
Expand Down
1 change: 1 addition & 0 deletions other/configuration/calculator.solution/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
displayName: 'calculator',
testEnvironment: 'jsdom',
testURL: 'http://localhost',
setupTestFrameworkScriptFile: require.resolve(
'./test/setup-test-framework.js',
),
Expand Down
1 change: 1 addition & 0 deletions other/jest-expect/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
displayName: 'expect',
testURL: 'http://localhost',
}
1 change: 1 addition & 0 deletions other/simple-react/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
displayName: 'react',
testURL: 'http://localhost',
}
1 change: 1 addition & 0 deletions server/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// ./server/jest.config.js
module.exports = {
displayName: 'server',
testURL: 'http://localhost',
testEnvironment: 'node',
modulePaths: ['<rootDir>/src', '<rootDir>/test'],
}

0 comments on commit e7d3c22

Please sign in to comment.