-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.cjs
50 lines (50 loc) · 1.18 KB
/
jest.config.cjs
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
module.exports = {
rootDir: '.',
moduleFileExtensions: ['ts', 'js', 'node', 'json'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
preset: 'ts-jest',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.jest.json',
},
},
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'(.+)\\.js': '$1',
},
testEnvironment: 'node',
testMatch: ['<rootDir>/__tests__/**/*.{spec,test}.ts'],
coverageDirectory: '<rootDir>/reports/jest',
coverageReporters: ['text', 'html', 'lcov', 'json'],
collectCoverageFrom: ['<rootDir>/src/**/*', '!**/node_modules/**'],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
reporters: [
'default',
[
'jest-junit',
{
ancestorSeparator: ' › ',
classNameTemplate: '{classname}',
outputDirectory: './reports/jest',
outputName: 'simple-rxstate-jest-junit.xml',
suiteName: 'jest simple rxstate tests',
titleTemplate: '{title}',
uniqueOutputName: 'false',
usePathForSuiteName: 'true',
},
],
],
displayName: {
name: 'simple-rxstate',
color: 'magenta',
},
};