-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathjest.config.js
More file actions
43 lines (43 loc) · 1017 Bytes
/
jest.config.js
File metadata and controls
43 lines (43 loc) · 1017 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
38
39
40
41
42
43
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.ts', '**/*.test.ts'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
'!src/**/__tests__/**',
'!src/types/**',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html', 'json'],
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70,
},
},
passWithNoTests: true,
testTimeout: 30000,
transform: {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
},
],
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
extensionsToTreatAsEsm: ['.ts'],
// Test file patterns
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/coverage/'],
// Separate slow tests
runner: 'jest-runner',
// Enable verbose output for CI
verbose: process.env.CI === 'true',
};