-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
37 lines (37 loc) · 903 Bytes
/
jest.config.js
File metadata and controls
37 lines (37 loc) · 903 Bytes
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
module.exports = {
verbose: true,
rootDir: '.',
roots: ['<rootDir>/src', '<rootDir>/test'],
testMatch: ['**/test/*spec.+(ts)', '**/test/**/*spec.+(ts)'],
collectCoverage: true,
coverageThreshold: {
global: {
branches: 20,
functions: 20,
lines: 20,
statements: 20,
},
},
coveragePathIgnorePatterns: ['./node_modules/', './test/', './debug', './build'],
coverageReporters: ['json-summary', 'text', 'lcov'],
transform: {
'^.+\\.[jt]s?$': [
'ts-jest',
{
useESM: true,
diagnostics: false,
tsconfig: 'tsconfig.json',
},
],
},
preset: 'ts-jest',
moduleFileExtensions: ['ts', 'js'],
moduleNameMapper: {
'@/(.*)\\.js$': '<rootDir>/src/$1.ts',
'@/(.*)?': '<rootDir>/src/$1',
'@test/(.*)\\.js$': '<rootDir>/test/$1.ts',
'@test/(.*)': '<rootDir>/test/$1',
},
moduleDirectories: ['node_modules', '<rootDir>/src'],
extensionsToTreatAsEsm: ['.ts'],
};