procyon/jest.config.js
2020-03-17 19:58:07 +01:00

32 lines
1.2 KiB
JavaScript

module.exports = {
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(-|/)(test))\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
modulePathIgnorePatterns: ['<rootDir>/.vscode/'],
moduleNameMapper: {
'^documentation(.*)$': '<rootDir>/modules/documentation/src/$1',
'^@romanjaros/treejs-components(.*)$': '<rootDir>/modules/treejs-components/src/$1',
'^@romanjaros/treejs-api(.*)$': '<rootDir>/modules/treejs-api/src/$1',
'^@romanjaros/treejs-auth(.*)$': '<rootDir>/modules/treejs-auth/src/$1',
'^@romanjaros/treejs-constants(.*)$': '<rootDir>/modules/treejs-constants/src/$1',
'^@romanjaros/treejs-utils(.*)$': '<rootDir>/modules/treejs-utils/src/$1',
'^@romanjaros/treejs-forms(.*)$': '<rootDir>/modules/treejs-forms/src/$1',
'^@romanjaros/treejs-localization(.*)$': '<rootDir>/modules/treejs-localization/src/$1',
'^@romanjaros/treejs-types(.*)$': '<rootDir>/modules/treejs-types/src/$1',
'\\.(css|less|sass|scss)$': '<rootDir>/tests/emptyMock.ts',
},
// enzyme
snapshotSerializers: ['enzyme-to-json/serializer'],
setupFilesAfterEnv: ['./modules/jestSetup.ts'],
globals: {
"ts-jest": {
diagnostics: {
warnOnly: true
}
}
}
};