-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
42 lines (42 loc) · 1.07 KB
/
jest.config.js
File metadata and controls
42 lines (42 loc) · 1.07 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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/test'],
testMatch: ['**/*.test.ts', '**/*.spec.ts'],
moduleFileExtensions: ['ts', 'js', 'json'],
collectCoverageFrom: [
'lib/**/*.ts',
'!lib/**/*.d.ts',
'!lib/**/index.ts',
'!lib/**/*.interface.ts',
],
coverageThreshold: {
global: {
branches: 80,
functions: 90,
lines: 90,
statements: 90,
},
},
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/lib/$1',
'^@core/(.*)$': '<rootDir>/lib/core/$1',
'^@parser/(.*)$': '<rootDir>/lib/parser/$1',
'^@rules/(.*)$': '<rootDir>/lib/rules/$1',
'^@config/(.*)$': '<rootDir>/lib/config/$1',
'^@cli/(.*)$': '<rootDir>/lib/cli/$1',
'^@formatters/(.*)$': '<rootDir>/lib/formatters/$1',
},
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
testTimeout: 10000,
globals: {
'ts-jest': {
tsconfig: {
esModuleInterop: true,
allowSyntheticDefaultImports: true,
},
},
},
};