-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
37 lines (35 loc) · 1.12 KB
/
jest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { swcAngularJestTransformer } from '@jscutlery/swc-angular-preset';
import type { Config } from 'jest';
const config: Config = {
clearMocks: true,
collectCoverage: true,
coverageDirectory: 'coverage',
coverageProvider: 'v8',
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
testEnvironment: 'jsdom',
testMatch: [
'<rootDir>/projects/demo/src/app/**/*.spec.ts',
'<rootDir>/projects/ngx-suspense-of/src/lib/**/*.spec.ts'
],
collectCoverageFrom: [
'<rootDir>/projects/ngx-suspense-of/src/lib/**/*.ts',
'!<rootDir>/projects/ngx-suspense-of/src/lib/**/index.ts'
],
moduleNameMapper: {
'projects/ngx-suspense-of/src/public-api': '<rootDir>/projects/ngx-suspense-of/src/public-api'
},
transform: {
'^.+\\.(ts|mjs|js)$': swcAngularJestTransformer(),
'^.+\\.(html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$'
}
]
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
testPathIgnorePatterns: ['<rootDir>/dist/']
};
export default config;