-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
76 lines (75 loc) · 2.02 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import type {Config} from '@jest/types';
// Sync object
const config: Config.InitialOptions = {
verbose: true,
roots: [
'<rootDir>/src',
],
testEnvironment: 'node',
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/**/*.ts',
'!**/node_modules/**',
'!**/__tests__/**',
'!**/__integrationtests__/**',
],
coverageDirectory: '.build-tmp/coverage',
cacheDirectory: '.build-tmp/jest-cache',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
testPathIgnorePatterns: [
'([A-Z]:)?((\w|[-_])*(\\|\/))*integration\.test\.ts$',
],
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx',
'json',
'node',
],
reporters: [
'default',
['jest-junit', {
outputDirectory: '.build-tmp',
outputName: 'junit.xml',
}],
],
preset: 'ts-jest',
globals: {
'ts-jest': {
tsconfig: {
'target': 'ES2019',
'module': 'commonjs',
'declaration': true,
'declarationMap': true,
'sourceMap': true,
'strict': true,
'composite': true,
'esModuleInterop': true,
'incremental': true,
'removeComments': true,
'lib': [
'ES2020',
],
'types': [
'jest',
'node',
],
'experimentalDecorators': true,
'emitDecoratorMetadata': true,
'rootDir': 'src/__tests__',
'outDir': 'lib',
'tsBuildInfoFile': '.build-tmp/tsconfig.tsbuildinfo',
'plugins': [
{
'transform': 'ts-type-checked/transformer',
},
],
},
},
},
};
export default config;