Skip to content

Commit

Permalink
chore(workspace): 🤖 fixed tests failing due to jest.roots
Browse files Browse the repository at this point in the history
This addresses jestjs/jest#9569
  • Loading branch information
jimmy-guzman committed Apr 11, 2020
1 parent 588d015 commit a979c3d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
6 changes: 4 additions & 2 deletions apps/portfolio/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const { name } = require('./package')
const base = require('../../jest.config.base.js')

module.exports = {
...base,
preset: undefined,
name: '@jimmy-guzman/portfolio',
displayName: '@jimmy-guzman/portfolio',
roots: ['<rootDir>/src'],
name,
displayName: name,
setupFilesAfterEnv: ['<rootDir>/jest.setup.js']
}
2 changes: 1 addition & 1 deletion jest.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
}
},
coverageReporters: ['html', 'text'],
roots: ['<rootDir>/src'],

verbose: true,
moduleNameMapper: {
'^.+\\.(css|scss)$': 'identity-obj-proxy'
Expand Down
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const base = require('./jest.config.base.js')

module.exports = {
...base,
projects: ['<rootDir>/{packages,apps}/*/jest.config.js']
projects: ['<rootDir>/{packages,apps}/*/jest.config.js'],
...base
}
6 changes: 4 additions & 2 deletions packages/components/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const { name } = require('./package')
const base = require('../../jest.config.base.js')

module.exports = {
...base,
name: '@jimmy-guzman/components',
displayName: '@jimmy-guzman/components'
roots: ['<rootDir>/src'],
name,
displayName: name
}
6 changes: 4 additions & 2 deletions packages/hooks/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const { name } = require('./package')
const base = require('../../jest.config.base.js')

module.exports = {
...base,
name: '@jimmy-guzman/hooks',
displayName: '@jimmy-guzman/hooks'
roots: ['<rootDir>/src'],
name,
displayName: name
}

0 comments on commit a979c3d

Please sign in to comment.