2023-11-27 14:57:51 +00:00
|
|
|
const { pathsToModuleNameMapper } = require('ts-jest');
|
2020-10-06 07:44:27 +00:00
|
|
|
const { compilerOptions } = require('./tsconfig');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
preset: 'jest-preset-angular',
|
2020-11-19 11:40:18 +00:00
|
|
|
setupFilesAfterEnv: ['<rootDir>/src/testing/setup.ts'],
|
2020-10-06 07:44:27 +00:00
|
|
|
testMatch: ['**/?(*.)test.ts'],
|
|
|
|
collectCoverageFrom: [
|
2024-03-19 14:41:52 +00:00
|
|
|
'src/**/*.ts',
|
2024-07-23 14:05:43 +00:00
|
|
|
'!src/**/*.test.ts',
|
2024-03-19 14:41:52 +00:00
|
|
|
'!src/assets/**/*',
|
2020-11-19 11:40:18 +00:00
|
|
|
'!src/testing/**/*',
|
2024-03-19 14:41:52 +00:00
|
|
|
'!src/core/initializers/index.ts',
|
|
|
|
'!src/core/features/emulators/services/zip.ts',
|
2020-10-06 07:44:27 +00:00
|
|
|
],
|
2024-07-10 08:34:32 +00:00
|
|
|
transformIgnorePatterns: ['node_modules/(?!@stencil|@angular|@ionic|@moodlehq|@ngx-translate|@awesome-cordova-plugins|swiper|jest-preset-angular)'],
|
2023-11-14 14:55:51 +00:00
|
|
|
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/src/' }),
|
2020-10-06 07:44:27 +00:00
|
|
|
};
|