forked from DeKal/portfolio-next-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
24 lines (24 loc) · 736 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
'\\.js$': '<rootDir>/node_modules/babel-jest'
},
testMatch: ['**/*.(test|spec).(ts|tsx)'],
globals: {
'ts-jest': {
babelConfig: true,
tsConfig: 'jest.tsconfig.json',
diagnostics: false
}
},
coveragePathIgnorePatterns: ['/node_modules/', 'enzyme.js'],
setupFilesAfterEnv: ['<rootDir>/enzyme.js'],
coverageReporters: ['json', 'lcov', 'text', 'clover'],
collectCoverageFrom: ['utils/**/*.js', 'views/**/*.js'],
testResultsProcessor: './node_modules/jest-junit-reporter',
moduleNameMapper: {
'~/(.*)': '<rootDir>/$1'
},
snapshotSerializers: ['enzyme-to-json/serializer']
}