generated from diva-e-aem/eds-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.ts
32 lines (29 loc) · 1 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
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
import { JestConfigWithTsJest } from 'ts-jest';
const jestConfig: JestConfigWithTsJest = {
preset: 'ts-jest',
clearMocks: true,
collectCoverage: true,
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: ['/node_modules/'],
coverageProvider: 'v8',
coverageReporters: ['text'],
moduleFileExtensions: ['js', 'ts'],
roots: ['<rootDir>/src'],
testEnvironment: 'jsdom',
setupFiles: ['<rootDir>/jest.setup.ts'],
moduleNameMapper: {
'^Blocks/(.*)$': '<rootDir>/src/blocks/$1',
'^Components/(.*)$': '<rootDir>/src/components/$1',
'^Directives/(.*)$': '<rootDir>/src/directives/$1',
'^Services/(.*)$': '<rootDir>/src/services/$1',
'^Helpers/(.*)$': '<rootDir>/src/helpers/$1',
'^Constants/(.*)$': '<rootDir>/src/constants/$1',
'^Types/(.*)$': '<rootDir>/src/types/$1',
'^Utils/(.*)$': '<rootDir>/src/utils/$1',
},
};
export default jestConfig;