mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-25 12:55:36 +08:00
31 lines
709 B
JavaScript
31 lines
709 B
JavaScript
module.exports = {
|
|
verbose: true,
|
|
|
|
setupFiles: ['./tests/setup.js'],
|
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
|
|
testPathIgnorePatterns: ['/pages/', '/dist/', '/lib/'],
|
|
|
|
transform: {
|
|
'^.+\\.tsx?$': ['babel-jest', { configFile: './tests/.babelrc.js' }],
|
|
},
|
|
|
|
testRegex: '.*\\.test\\.(j|t)sx?$',
|
|
// testRegex: 'grid\\/.*\\.test\\.(j|t)sx?$',
|
|
|
|
collectCoverageFrom: [
|
|
'components/**/*.{ts,tsx}',
|
|
'!components/**/styles.{ts,tsx}',
|
|
'!components/**/*types.{ts,tsx}',
|
|
'!components/styles/*',
|
|
'!components/index.ts',
|
|
'!components/utils/*',
|
|
],
|
|
|
|
moduleNameMapper: {
|
|
'tests/(.*)$': '<rootDir>/tests/$1',
|
|
components: '<rootDir>/components/index.ts',
|
|
},
|
|
}
|