-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
34 lines (32 loc) · 1.09 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
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-nullable/src/lib/**/*.spec.ts'],
collectCoverageFrom: [
'<rootDir>/projects/ngx-nullable/src/lib/**/*.ts',
'!<rootDir>/projects/ngx-nullable/src/lib/**/index.ts'
],
moduleNameMapper: {
'projects/ngx-nullable/src/public-api': '<rootDir>/projects/ngx-nullable/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;