-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
36 lines (35 loc) · 1.13 KB
/
jest.config.js
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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
export default {
clearMocks: true,
coverageDirectory: '<rootDir>/coverage',
collectCoverageFrom: ['<rootDir>/src/**/*.ts', '!<rootDir>/src/types/generated/**/*', '!<rootDir>/src/debug.ts'],
coveragePathIgnorePatterns: ['\\\\node_modules\\\\', 'tests'],
moduleFileExtensions: ['ts', 'tsx', 'js'],
testMatch: ['<rootDir>/tests/**/*.(test|tests|spec|specs).+(ts|tsx|js)'],
reporters: [
'default',
[
'jest-sonar',
{
outputDirectory: '<rootDir>/coverage',
outputName: 'test-report.xml',
reportedFilePath: 'absolute'
}
]
],
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},
transform: {
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true
}
]
}
};