Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 1 | module.exports = { |
| 2 | // mapCoverage: true, |
| 3 | globals: { |
| 4 | __TS_CONFIG__: { |
| 5 | target: 'es6', |
| 6 | module: 'commonjs', |
| 7 | moduleResolution: 'node' |
| 8 | }, |
| 9 | 'ts-jest': { |
| 10 | tsConfigFile: 'src/tsconfig.spec.json' |
| 11 | }, |
| 12 | __TRANSFORM_HTML__: true |
| 13 | }, |
| 14 | testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|js)$', |
| 15 | setupTestFrameworkScriptFile: '<rootDir>/src/setupJest.ts', |
| 16 | transform: { |
| 17 | '^.+\\.(ts|html)$': |
| 18 | '<rootDir>/node_modules/jest-preset-angular/preprocessor.js' |
| 19 | }, |
| 20 | transformIgnorePatterns: ['node_modules/(?!@ngrx)'], |
| 21 | collectCoverageFrom: [ |
| 22 | 'src/app/module/**/*.{ts}', |
| 23 | '!src/app/*.{ts}', |
| 24 | '!src/app/**/*.{js}', |
| 25 | '!src/app/environment/*.{ts}', |
| 26 | '!src/app/language/*.{ts}', |
| 27 | '!src/app/**/*.module.{ts}', |
| 28 | '!src/app/**/*.interface.{ts}', |
| 29 | '!src/app/**/*.state.{ts}', |
| 30 | '!src/app/**/*.entity.{ts}' |
| 31 | ], |
| 32 | moduleFileExtensions: ['ts', 'tsx', 'js', 'json'], |
| 33 | testPathIgnorePatterns: ['/node_modules/', '/dist/', 'src/app/*.{js}'], |
| 34 | testResultsProcessor: 'jest-sonar-reporter', |
| 35 | moduleNameMapper: { |
| 36 | 'app/(.*)': '<rootDir>/src/app/$1', |
| 37 | '@common/(.*)': '<rootDir>/src/app/common/$1' |
| 38 | } |
| 39 | }; |