2019-10-08 22:39:33 +00:00
|
|
|
module.exports = {
|
2019-10-17 20:58:17 +00:00
|
|
|
setupFilesAfterEnv: ['./jestSetup.ts'],
|
2019-10-08 22:39:33 +00:00
|
|
|
displayName: 'test',
|
|
|
|
testURL: 'http://localhost',
|
|
|
|
testPathIgnorePatterns: [
|
2019-10-25 18:28:11 +00:00
|
|
|
'<rootDir>/build',
|
2019-10-08 22:39:33 +00:00
|
|
|
'<rootDir>/node_modules/(?!(jest-test))',
|
2019-10-17 20:58:17 +00:00
|
|
|
'cypress',
|
2019-10-08 22:39:33 +00:00
|
|
|
],
|
2019-10-17 20:58:17 +00:00
|
|
|
setupFiles: ['<rootDir>/testSetup.ts'],
|
|
|
|
modulePaths: ['<rootDir>', '<rootDir>/node_modules'],
|
|
|
|
moduleDirectories: ['src'],
|
2019-10-08 22:39:33 +00:00
|
|
|
transform: {
|
2019-10-17 20:58:17 +00:00
|
|
|
'^.+\\.tsx?$': 'ts-jest',
|
2019-10-08 22:39:33 +00:00
|
|
|
},
|
|
|
|
testRegex: '(/__tests__/.*|(\\.|/)(test))\\.(ts?|tsx?)$',
|
2019-10-17 20:58:17 +00:00
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
|
|
snapshotSerializers: ['enzyme-to-json/serializer'],
|
2019-10-08 22:39:33 +00:00
|
|
|
moduleNameMapper: {
|
2019-10-17 20:58:17 +00:00
|
|
|
'\\.(css|scss)$': 'identity-obj-proxy',
|
2019-10-08 22:39:33 +00:00
|
|
|
},
|
|
|
|
globals: {
|
|
|
|
'ts-jest': {
|
2019-10-17 20:58:17 +00:00
|
|
|
tsConfig: 'tsconfig.test.json',
|
2019-10-22 22:31:35 +00:00
|
|
|
diagnostics: {
|
2019-11-21 01:04:43 +00:00
|
|
|
ignoreCodes: [6133, 6192] // ignore unused variable errors
|
2019-10-22 22:31:35 +00:00
|
|
|
},
|
2019-10-17 20:58:17 +00:00
|
|
|
},
|
2019-10-14 22:10:10 +00:00
|
|
|
},
|
|
|
|
collectCoverageFrom: [
|
|
|
|
'./src/**/*.{js,jsx,ts,tsx}',
|
2019-10-17 20:58:17 +00:00
|
|
|
'!./src/**/*.test.{js,jsx,ts,tsx}',
|
2019-10-14 22:10:10 +00:00
|
|
|
],
|
|
|
|
coverageDirectory: './coverage',
|
2019-10-17 20:58:17 +00:00
|
|
|
coverageReporters: ['html', 'cobertura'],
|
2019-12-18 03:36:13 +00:00
|
|
|
reporters: ['default', 'jest-junit'],
|
2019-10-08 22:39:33 +00:00
|
|
|
}
|