-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjest.config.ts
executable file
·34 lines (33 loc) · 950 Bytes
/
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
import type { Config } from 'jest'
const config: Config = {
verbose: true,
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src', '<rootDir>/__tests__', '<rootDir>/testHelpers'],
transform: {
'^.+\\.tsx+$': 'ts-jest',
},
testRegex: '/__tests__/(.*|(\\.|/)(test|spec))(\\.tsx)+$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
// setupFiles: ["<rootDir>/.jest/setEnvVars.js"]
collectCoverage: true,
coverageDirectory: './',
coveragePathIgnorePatterns: ['/node_modules/', '__test__/'],
coverageReporters: ['json-summary'],
reporters: [
'default',
[
'jest-junit',
{
suiteName: 'jest tests',
outputDirectory: '.',
outputName: 'junit.xml',
uniqueOutputName: 'false',
classNameTemplate: '{filename}',
titleTemplate: '{title}',
suiteNameTemplate: '{filename}',
} as any,
],
],
}
export default config