Files
react/.jest.config.js
witt 2d77894000 fix(bundle): fix modules missing in yarn berry (#563)
* chore: add peer dependencies

* fix(bundle): fix modules missing in yarn berry

* chore: upgrade configs for jest 27
2021-06-24 00:15:58 +08:00

36 lines
858 B
JavaScript

module.exports = {
verbose: true,
testEnvironment: 'jsdom',
setupFiles: ['./tests/setup.js'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
testPathIgnorePatterns: ['/pages/', '/dist/', '/lib/', '/esm/'],
transform: {
'^.+\\.tsx?$': ['babel-jest', { configFile: './tests/.babelrc.js' }],
},
testRegex: '.*\\.test\\.(j|t)sx?$',
// testRegex: 'scaleable\\/.*\\.test\\.(j|t)sx?$',
collectCoverageFrom: [
'components/**/*.{ts,tsx}',
'!components/**/styles.{ts,tsx}',
'!components/**/*types.{ts,tsx}',
'!components/use-theme/*',
'!components/use-all-themes/*',
'!components/themes/*',
'!components/geist-provider/*',
'!components/index.ts',
'!components/utils/**/*',
],
moduleNameMapper: {
'tests/(.*)$': '<rootDir>/tests/$1',
components: '<rootDir>/components/index.ts',
},
}