feat(crud): add jest test config

This commit is contained in:
thomas laforge
2022-12-11 20:42:13 +01:00
parent a9a3b7a7d8
commit 97f1ede245
6 changed files with 102 additions and 0 deletions

22
apps/crud/jest.config.ts Normal file
View File

@@ -0,0 +1,22 @@
/* eslint-disable */
export default {
displayName: 'crud',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
coverageDirectory: '../../coverage/apps/crud',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};