-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathjest.config.js
More file actions
45 lines (45 loc) · 1.02 KB
/
jest.config.js
File metadata and controls
45 lines (45 loc) · 1.02 KB
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
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
preset: 'ts-jest',
testEnvironment: 'jsdom',
moduleFileExtensions: ['ts', 'js'],
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: 'tsconfig.json',
}],
},
testMatch: ['**/tests/**/*.test.ts'],
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['json', 'lcov', 'text', 'clover'],
coveragePathIgnorePatterns: [
'/node_modules/',
'/target/',
'/examples/',
'/dist/',
'/build/',
'/coverage/',
'/test-results/'
],
testPathIgnorePatterns: [
'/node_modules/',
'/target/',
'/examples/',
'/dist/',
'/build/',
'/coverage/',
'/test-results/'
],
reporters: [
'default',
['jest-junit', {
outputDirectory: 'test-results',
outputName: 'junit.xml',
classNameTemplate: '{classname}',
titleTemplate: '{title}',
ancestorSeparator: ' › ',
usePathForSuiteName: true
}]
],
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts']
};