mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-28 20:25:29 +08:00
30 lines
693 B
JavaScript
30 lines
693 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: 'fieldset\\/.*\\.test\\.(j|t)sx?$',
|
|
|
|
collectCoverageFrom: [
|
|
'components/**/*.{ts,tsx}',
|
|
'!components/**/styles.{ts,tsx}',
|
|
'!components/styles/*',
|
|
'!components/index.ts',
|
|
'!components/utils/*',
|
|
],
|
|
|
|
"moduleNameMapper": {
|
|
"tests/(.*)$": "<rootDir>/tests/$1",
|
|
"components": "<rootDir>/components/index.ts",
|
|
},
|
|
}
|