mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-29 12:45:32 +08:00
* chore: add peer dependencies * fix(bundle): fix modules missing in yarn berry * chore: upgrade configs for jest 27
36 lines
858 B
JavaScript
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',
|
|
},
|
|
}
|