-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.ts
30 lines (26 loc) · 867 Bytes
/
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
// https://thymikee.github.io/jest-preset-angular/docs/getting-started/installation
// https://thymikee.github.io/jest-preset-angular/docs/getting-started/presets/#createcjspresetoptions
import presets from 'jest-preset-angular/presets';
import type { Config } from 'jest';
const presetConfig = presets.createCjsPreset({
//...options
});
const jestConfig: Config = {
...presetConfig,
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
// globalSetup: 'jest-preset-angular/global-setup',
testPathIgnorePatterns: ['<rootDir>/cypress/'],
/*
https://kulshekhar.github.io/ts-jest/docs/getting-started/paths-mapping/
tsconfig.json
"baseUrl": "src",
"paths": {
"@app/*": ["app/*"]
}
*/
moduleNameMapper: {
'^@app/(.*)$': '<rootDir>/src/app/$1',
},
resolver: '<rootDir>/jest-resolver.js',
};
export default jestConfig;